Advertisement

Ng Container Vs Ng Template

Ng Container Vs Ng Template - Which is better to be used in our code. If you use it without the structural directive, nothing happens and it will render. It provides a way to define an html code that can be reused multiple times. I've read an answer regarding the difference between this. Web 2,774 12 49 96 add a comment 2 answers sorted by: I solved it this way: We can even change completely the look and feel of a component based on input templates, and we can define a template and instantiate on.

Template vs. ngcontainer For Grouping DOM Nodes In Angular 2.4.4
Angular ngcontent, ngcontainer, ngtemplate and ngTemplateOutlet
ngcontent vs ngtemplate vs ngcontainer Advanced Angular Hero to

I Solved It This Way:

I've read an answer regarding the difference between this. It provides a way to define an html code that can be reused multiple times. We can even change completely the look and feel of a component based on input templates, and we can define a template and instantiate on. Web 2,774 12 49 96 add a comment 2 answers sorted by:

Which Is Better To Be Used In Our Code.

If you use it without the structural directive, nothing happens and it will render.

Related Post: