Building a Website With
SENIOR CONSULTANT, NEUDESIC
@COBALTCODER WWW.COBALTCODER.COM WWW.NEUDESIC.COM
Why Are We Here?
Learn to use various parts of Angular:
Cohesive block of code
declarations - the view classes that belong to this module.
Three kinds of view classes: components, directives, and pipes.
exports - the subset of declarations made visible to other modules.
imports - declares exports from other modules for use in the current module.
providers - list of services that this module contributes to the global collection of
services; they become accessible in all parts of the app.
bootstrap - the main application view, called the root component, that hosts all other
A form of HTML that tells Angular how to render the component.
Looks like HTML with some subtle differences
Two-way data: [()]
A directive is a class that modifies the DOM.
Decorated with @Directive
When Angular renders a template, it transforms the DOM according to the
instructions given by directives.
Some built-in directives
*ngFor (structural directive)
*ngIf (structural directive)
ngModel (attribute directive)
Can build custom directives
Demo - Directives
Show *ngFor, *ngIf, ngModel in templates
Used to share information and methods between components
Angular has no formal definition of a service
Make it @Injectable for dependency injection