Created
February 10, 2020 16:30
-
-
Save matheusmurta/d7cf87cab7dedee3a2699cf5f35fe0e6 to your computer and use it in GitHub Desktop.
Angular send ng-template to component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//your component | |
<div *ngTemplateOutlet="template"></div> | |
@Input() template :TemplateRef<any>; | |
//your module | |
<ng-template #loading> | |
<div>Loading...2</div> | |
</ng-template> | |
<my comp>...[template]="loading"> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment