Categories

Nov 24, 2019 in Angular
Q: What is ng-content Directive?

1 Answer

Nov 24, 2019

The HTML elements like p (paragraph) or h1 (heading) have some content between the tags. For example, <p>this is a paragraph</p> and <h1>this is a heading</h1>. Now, similar to this, what if we want to have some custom text or content between the angular tags like  <app-tax>some tax-related content</app-tax> This will not work the way it worked for HTML elements.  Now, in such cases, the <ng-content> tag directive is used. 

Click here to read more about Angular JS
Click here to read more about Insurance

Related questions

Madanswer
Jan 6 in Angular
Jun 7 in Hadoop
Aug 17 in HTML
...