In AngularMaterial, I saw code like this.
<form class="example-form">
<mat-form-field class="example-full-width">
<input matInput placeholder="Favorite food" value="Sushi">
</mat-form-field>
</form>
There are <input>
element inside <mat-form-field>
component.
Usually, when I wrote element inside component, It wil be ignored.
How can I do this.
Using <ng-content></ng-content>
to slot your element.
https://medium.com/claritydesignsystem/ng-content-the-hidden-docs-96a29d70d11b
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments