Loading different templates in a component based on condition in Angular 2

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

Answers (1)

Andrei Zhytkevich
Andrei Zhytkevich

Reputation: 8099

You can do it using:

or

P.S. You get downvote because your question is too broad and you haven't shown what you've tried so far.

Upvotes: 1

Related Questions