This project was generated with Angular CLI version 1.6.2.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
ng serve http://localhost:4200/accueil http://localhost:4200/auth/login
ssh-keygen -t ed25519 -C "nr.belhadj@gmail.com" pp nora
déposer un projet sur github se positionnr dans le projet
$ git init // initialise le dosier local comme un repo local
$ git add . // ajouter ls fichiers au repo local
$ git comit -m "Prmier commit"
$ git remote add origin https://github.com/noraBelhadj/webproject.git (creation du repo git du projet en question, on peut le creer directement sur l'nterface git)
$ git push -u origin master // commiter les modifications sur la trunk ( master)
$ git pull
se positionner dans un repertoire distiné à la branche $ git init $ git add . $ git remote add origin https://github.com/noraBelhadj/webproject.git $ git fetch // affiche l'ensemble des branches $ git checkout webproject-feature $ git checkout -b webproject-feature origin/webproject-feature // recuprer la branch feature et switch vers la brance feature $ npm install $ ng serve
$ git commit -a -m "commit feature" $ git push $ git pull // Tout mettre à jour
lorsqu'on ajoute de nouveau components ou fichier,il faut executer git add . pour ls ajouter puis commit et push
exemple la route /home
le component s'ajout autaumatiquement aux déclaration du fichier app.module, pui ajouter la route { path:'home', component:HomeComponent} ==> avec le lazy loading: atape:1 creer un fichier home.module.ts export const routes = [{ path:'', component: HomeComponent} ]; @NgModule({ declarations: [ HomeComponent ], imports: [ RouterModule.forChild(routes) ], providers: [ ] }) export class HomeModule {} Remarque : laisser le champs path vide car le path sera ajouter dans le fichier app.module
etape2:
ajouter la route:
{ path: 'home', loadChildren: './components/home/home.module#HomeModule' }
pour un lien profond: ex /home/subscribe
ajouter dans la déclaration de SubscribeComponent dans home.module.ts et la route export const routes = [{ path:'', component: HomeComponent} , {path:'subcribe', component: HomeComponent}];
ngif, ngfor
[ngClass] , [ngStyle]
##canactivate
##session
##les states (ngrx)
#######utilité des fichiers
#######contenu de l'appli
page login pag souscrire
https://www.concretepage.com/angular-2/angular-2-4-child-routes-and-relative-navigation-example
https://itnext.io/child-routes-with-respective-components-in-angular-4-36f1be42278e
https://stackblitz.com/angular/jbgeoqlbyea?file=src%2Fapp%2Fapp.component.ts
test ordi 2