in Angular by
Q:
What is ng-content Directive?

▼ Show 1 Answer

0 votes
by

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. 

Angular JS
Learn More with Madanswer

Related questions

0 votes
asked Feb 5 in Angular by SakshiSharma
...