Bootstrapping our App Component

Since we have used Angular CLI to create this starter file, the 'index.html' is already hosting our app component and app.module.ts file already bootstrap our app component.


where,
'declaration' array declares app component so that angular can locate selector
'import' array includes browser module so that application run correctly in browser
'providers' array is used for services
'bootstrap' array list our app component as starting component for our application

To host our application we use component's selector as a directive in 'index.html'. We can think of directive as a custom HTML tag. Since we have used Angular CLI, directive is already included.

Share this

Related Posts