4

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.

Sangwin Gawande
  • 6,656
  • 8
  • 46
  • 60
  • 2
    I don't know why is this question marked negative. If you know the answer please share it. – Pulak Kanti Bhattacharyya Oct 05 '16 at 13:50
  • Possible duplicate of [Dynamic template URLs in Angular 2](http://stackoverflow.com/questions/31692416/dynamic-template-urls-in-angular-2) – tibbus Oct 05 '16 at 13:56
  • Also you may want to take a look at this one : http://stackoverflow.com/questions/39381855/passing-components-in-angular2/39382636#39382636 – tibbus Oct 05 '16 at 13:57

1 Answers1

1

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.

Andrei Zhytkevich
  • 7,721
  • 2
  • 28
  • 43