Skip to content

Instantly share code, notes, and snippets.

@adrianfaciu
Last active October 21, 2018 19:21
Show Gist options
  • Save adrianfaciu/f25d269e2e3875204d6e1fb11fbe6852 to your computer and use it in GitHub Desktop.
Save adrianfaciu/f25d269e2e3875204d6e1fb11fbe6852 to your computer and use it in GitHub Desktop.
<ng-container *ngIf="data.text; else templateRef">
{{ data.message }}
</ng-container>
<ng-template #templateRef>
<ng-container *ngTemplateOutlet="data.template; context: data.templateContext">
</ng-container>
</ng-template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment