- Install NodeJS Installer
Note, for those using linux, you can find instruction to install NodeJS here (install the latest LTS Version 12.14.1).
- Fork this repository
Click on the fork button on the page of the repository on github to create your own copy of the starter.
- Clone your repository, your fork
git clone https://github.com/YOUR_USERNAME/starter-quiz.git
- Install the dependencies
Open command prompt inside the repository (starter-quiz) and run:
npm install
If you have an error saying that npm is not a known command, it means that NodeJS is not installed.
- Install angular/cli
npm install -g @angular/cli
npm start
Then navigate to http://localhost:4200/
to see the application. The app will automatically reload if you change any of the source files.
You can also use the command ng serve
to start the app and also ng serve --open
to open directly the app in the browser.
npm run lint
Note: The linter will be executed before each commit. If the linter fails then the commit will be canceled.
Several issues from the linter can be fixed automatically (for instance: trailing whitespace, missing new line etc...) thanks to the following command:
npm run lint -- --fix
But you will have to manually manage the other types of error.
The best documentation is the Official Angular Documentation. It contains everything and it is always up to date.
We are working with Angular version 2+ (here Angular 8). When you look for some documentation, add "Angular 2" in your research to be sure to find the right documentation. You might find documentation about AngularJS, run if it's the case! It's a very old version totally different from our version.
Documentation Angular:
Documentation on Observables:
Any question? Do not hesitate to contact us on slack for any question.
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
.