Please enable JavaScript.
Coggle requires JavaScript to display documents.
Angular, What, NgModules, Components, services, root component, Templates,…
Angular
How
define views, which are sets of screen elements that Angular can choose among and modify according to your program logic and data
Every Angular application has at least one component, the root component
-
The Component() decorator identifies the class component
The metadata for a component tells Angular where to get the major building blocks that it needs to create and present the component and its view.
Component({
selector: 'app-hero-list',templateUrl: './hero-list.component.html', providers: [ HeroService ] })export class HeroListComponent implements OnInit { / . . . /
}
provide specific functionality not directly related to views. Service providers can be injected into components as dependencies,
A service class definition is immediately preceded by the Injectable() decorator
service class that logs to the browser console
export class Logger {
log(msg: any) { console.log(msg); }
error(msg: any) { console.error(msg); }
warn(msg: any) { console.warn(msg); }
}
a compilation context for the project components.
an Angular app is defined by a set of NgModules.
Example: An app always has at least a root module that enables bootstrapping, and typically has many more feature modules.
A template combines HTML with Angular markup that can modify HTML elements before they are displayed
Template directives provide program logic,
-
Angular supports two-way data binding, a mechanism for coordinating the parts of a template with the parts of a component.
<li>{{hero.name}}</li>
<app-hero-detail [hero]="selectedHero"></app-hero-detail>
<li (click)="selectHero(hero)"></li>
A directive is a class with a Directive() decorator.
A component is technically a directive.
-
Angular is a platform and framework for building single-page client applications using HTML and TypeScript. Angular is written in TypeScript.
The Angular Router NgModule provides a service that let us define a navigation path among the different application states and view hierarchies in the app.
Angular pipes let you declare display-value transformations in your template HTML.
{{interpolated_value | pipe_name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-