August 2017
Intermediate to advanced
330 pages
7h 26m
English
Components are the main way to build and specify elements and logic on the page. They create custom HTML elements (tags) to be used in the HTML page and start using the Angular features in them.
From the Angular-CLI-generated application, open the index.html page to see the <app-root>Loading...</app-root> HTML element. This isn't a regular HTML element-it's an Angular component with the selector name of app-root.
On examining the app.component.ts file, we would see the component declaration mentioning the selector name, template file (HTML file), and style sheet file path too:
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
The Angular docs will ...
Read now
Unlock full access