chkettu / NGEssentials-CourseProject

Angular 4 Essentials - based on Udemy course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes on Udemy's "Angular 4 Essentials"

Resources

Setup

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.

Notes

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 and FormGroups implicitly using ngFormandngControl` (as shown in the course).
  • Building forms with FormBuilder (helper class to build forms more flexible). Git branch spike/form-builder.

Optimizations:

  • Create your own AppRoutingModule.
  • Lazy loading of components with Feature-Modules and loadChildren-routes.

Deployment

  • run ng build --prod (converts all into javascript and minifizes code due to --prod - code will be found in dist-folder)
  • change base-href for webserver: run ng build --prod --base-href /my-cool-app/
  • copy files of dist-folder onto webserver

About

Angular 4 Essentials - based on Udemy course


Languages

Language:TypeScript 74.5%Language:HTML 14.5%Language:JavaScript 9.9%Language:CSS 1.0%