Created
October 24, 2017 01:30
-
-
Save cgatian/924101cdad2a8d5d27f50875da10df43 to your computer and use it in GitHub Desktop.
This file contains 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-test', | |
template: ` | |
<ng-content [cdkPortalHost]="_portalInstance"></ng-content> | |
` | |
}) | |
export class TestComponent implements OnInit { | |
_portalInstance: Portal<any>; | |
constructor() { } | |
ngOnInit() { | |
this._portalInstance = new ComponentPortal(HeaderComponent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment