Last active
March 13, 2020 06:39
-
-
Save ericjeker/c66605264ac6469ad89c2159b8d2b1d5 to your computer and use it in GitHub Desktop.
Content projection in Angular
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
@Component({ | |
selector: 'app-my-content', | |
template: '<ng-content></ng-content>', | |
}) | |
class MyContent { | |
} |
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
<app-my-content><p>This will be projected in the component</p></app-my-content> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment