Reputation: 412
Scenario:
I have a component say, COMP which has to load either of the two templates, say, TEMPLATE_1 or TEMPLATE_2 based on the type of user logged in (Say, ADMIN user and NORMAL user).
How to do it using Angular 2 latest release?
Disclaimer: I am new to Angular 2.
Upvotes: 4
Views: 3763
Reputation: 8099
You can do it using:
ngIf
https://angular.io/docs/ts/latest/api/common/index/NgIf-directive.htmlor
P.S. You get downvote because your question is too broad and you haven't shown what you've tried so far.
Upvotes: 1