Get Started with Angular 8

Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile, and native desktop.

Important Commands:

  1. npm install -g @angular/cli
  2. ng new hello-world
  3. ng build –prod (for generating production ready files)
  4. ng serve and the app is available at http://localhost:4200
  5. To create a component use the command ng g c course
  6. To create services use the command; ng g s service-name
  7. ng add @angular/material OR npm install –save @angular/material @angular/cdk
  8. npm install –save @angular/animations
  9. npm install –save hammerjs
  10. ng add angular-bootstrap-md

Core Angular Concepts:

  1. Interpolation
  2. Property interpolation
  3. Class binding
  4. Style binding
  5. Event binding
  6. Template reference variables
  7. Two way binding
  8. Structural directives (allows to add or remove HTML elements)
    • ngIf
    • ngSwitch
    • ngFor
  9. Component Interactions is achieved using @input and @output-> EventEmitter
  10. Pipes allow us to transform data before it’s displayed
  11. A service is used to get the data and component will prepare it for the view
  12. Dependency Injection: We can use Injector (providers array) as a container to register all dependencies
  13. We need to register the service as dependency in relevant component
  14. To make the returned response from http request usable, we have Observable concept. Observable: “A sequence of items that arrive asynchronously over time”. As a result of http call, we receive a single item instead of sequence of items. An observable is converted to appropriate format by the angular service. Then this service provide the data to the components which have subscribed to that service. To work with observable, we use javascript library RxJS (Reactive Extensions for Javascript).
  15. HTTP error handling is done using catch and throw modules
  16. Routing and navigation in Angular
    • Wildcard route and redirecting routes
    • Route parameters
    • paramMap Observable
    • Optional route parameters
    • Relative navigation
    • Child routes
  17. Angular flex for layout
  18. Custom pipes in angular

Leave a Comment

Your email address will not be published. Required fields are marked *