https://angular.io/guide/what-is-angular#what-is-angular
Angular is a development platform based on TypeScript. It includes:
A Component includes a TypeScript class with:
The HTML template declares how the component should be rendered. It can be done inline or by file path.
Inline:
@Component ({
selector: 'hello-world',
template: `<p>{{message}}</p>`
})
By file path:
@Component ({
selector: 'hello-world',
templateUrl: './hello-world-interpolation.component.html'
})
{{}} )[] )
The following examples illustrates how the HTML attribute style.color can be bound to the TypeScript variable fontColor from the component class.
<p [id]="sayHelloId" [style.color]="fontColor"> You can set my color in the component! </p>
Event listeners can be declared with the help of parentheses:
<button type="button" [disabled]="!canClick" (click)="sayMessage()"> Trigger alert message </button>
The event listener calls the method sayMessage() which is defined in the component class.
Directives can be used to add features to the templates. For example:
It is also possible to declare own custom directives.
@Injectable declarationimport { Logger } from '../logger.service';constructor(private logger: Logger) { }this.logger.writeCount(this.count)ng build → Compiles an Angular application into an output directory.ng serve → Builds and serves your application, rebuilding on file changes.ng generate → Generates or modifies files based on a schematic.ng test → Runs unit tests on a given project.ng e2e → Builds and serves an Angular application, then runs end-to-end tests.…