Skip to content

Instantly share code, notes, and snippets.

@cgatian
Last active October 25, 2017 01:58
Show Gist options
  • Save cgatian/f9b7ceafc1cb527112fa4c958b6233e3 to your computer and use it in GitHub Desktop.
Save cgatian/f9b7ceafc1cb527112fa4c958b6233e3 to your computer and use it in GitHub Desktop.
@Component({
selector: 'my-app',
template: `
<ng-template cdkPortal #testTemplate="cdkPortal" let-name>
<div>User {{ name }} </div>
</ng-template>`,
})
export class AppComponent implements OnInit {
@ViewChild('testTemplate') testTemplatePortal: TemplatePortal<any>;
constructor() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment