Categories

Jan 6 in Angular
Q: Define the ng-content Directive?

1 Answer

Jan 6

Conventional HTML elements have some content between the tags. For instance:

<p>Put your paragraph here</p>

Now consider the following example of having custom text between angular tags:

<app-work>This won’t work like HTML until you use ng-content Directive</app-work>

However, doing so won’t work the way it worked for HTML elements. In order to make it work just like the HTML example mentioned above, we need to use the ng-content Directive. Moreover, it is helpful in building reusable components.

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
Dec 27, 2019 in Data Science
...