This project was generated with Angular CLI version 1.4.5. with the IntelliJ "New project"-assistant.
- Choose
File/New Project/Static Web/Angular CLI
to create project. - run
npm install
from the command line. - run
npm start
from the command line to start project. - Open link in your browser.
Components and services should be created with the ng
-command - it adds all configurations needed to the project files with the common Angular-notation.
- Create components with:
ng g c component --spec false
(--spec false
creates component without test class) - Create services with:
ng g s service --spec false
- Create modules with:
ng g m module
Two approaches to create a Form:
- Building
FormControls
andFormGroups implicitly using
ngFormand
ngControl` (as shown in the course). - Building forms with
FormBuilder
(helper class to build forms more flexible). Git branchspike/form-builder
.
Optimizations:
- Create your own
AppRoutingModule
. - Lazy loading of components with Feature-Modules and
loadChildren
-routes.
- run
ng build --prod
(converts all into javascript and minifizes code due to--prod
- code will be found indist
-folder) - change base-href for webserver: run
ng build --prod --base-href /my-cool-app/
- copy files of
dist
-folder onto webserver