Interacting with the Angular framework
When working with Angular, the real fun starts when we get our hands dirty with the framework itself. After all, understanding how Angular works and writing the application code is what matters.
The application source code resides inside the src\app
folder at the root of our Angular CLI project. It contains all the files needed to build and test our Angular application, including a component and a module. The component is the main component of the Angular application:
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'my-app';
}
The following properties characterize an Angular component:
selector
: A unique name used to identify and declare the component inside HTML content. It is an HTML tag, just like any...