Template property of Component | Components | Angular 12+

preview_player
Показать описание
We have learned that for each component we need to provide a view template, so that wherever we will use the selector of that component in angular application, the HTML content of the view template will be rendered in the web page.

So far, we have used templateUrl property to specify the path of the HTML file which we want to use as a view template for the component. But there is another property of a component decorator, which is template property, which is also used to specify the view template for a component.

let's learn about the template property of component decorator and let's understand how can we use it.
Рекомендации по теме
Комментарии
Автор

I have viewed over 100 web dev tutorials past year. This is one of the very best.

michaelkiger-avianwebhosti
Автор

My template is not rendering in the browser. I have checked many videos regarding this but not able to get it, please help me

anjaneyulunavuluri
Автор

Sir back ticks `` are throwing error in webpage for template

surajdudhe
Автор

Passing html in template saves the applicaiton from Cross Site scripting. template: '<div

Keyminds-TheCodingAcademy
Автор

great, can you share source code or git link

sureshpal
Автор

please provide your notepad file in description.

debjitpal
Автор

what is OnInit interface? you doesnt tell that, thnx

nasossoulis