Sunday 26 March 2023

Dodanie nowego komponentu - app.module.ts


  1. import { YourNameComponent } from './pages/admin/YourName/YourName.component';

  2. appRoutes: Routes = [
    {
    path: 'admin/YourName',
    component: YourNameComponent,
    canActivate: [AuthenticationGuard],
    data: { title: 'Your Name', isNew: true }
    },

  3. @NgModule({
      declarations: [
        YourNameComponent

Saturday 25 March 2023

Preparing Dev Env for Angular

Install software
1. Install Visual Studio Code
2. Install Git
3. Install Node.js

Configure Angular with NPM (node package manager)

1. install Angular CLI - use command prompt or VS Code terminal
npm install -g @angular/cli
2. install SASS
npm install -g node-sass
3. To create new Angular project with SASS as default style:
ng new project-name-here --style=scss
4. To create new Angular component:
ng generate component name-here