How to Create component and services in angularjs
Create Component —————-
1 |
ng g c dashboard --spec=false --inline-style |
here dashboard component will be created with folder dashboard.So inside Dashboard folder following files will be available src/app/dashboard/dashboard.component.html src/app/dashboard/dashboard.component.ts Service,Guards Creation —————- here authentication guard service is created using the following commands
1 2 |
ng g s services/authentication --flat --spec=false ng g g guards/authentication --flat --spec=false |
it will generate the following two files inside services,guards folders src/app/services/authentication.ts src/app/guards/authentication.guard.ts