Advertisement

Ng Container Vs Ng Template

Ng Container Vs Ng Template - Which is better to be used in our code. 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. I solved it this way: Web 2,774 12 49 96 add a comment 2 answers sorted by: If you use it without the structural directive, nothing happens and it will render. 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.

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

Web 2,774 12 49 96 Add A Comment 2 Answers Sorted By:

I've read an answer regarding the difference between this. I solved it this way: If you use it without the structural directive, nothing happens and it will render. Which is better to be used in our code.

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.

Related Post: