I'm new to angular 2. In angular 1 i used ui-router and templateProvider to use different templates in one controller, for example:
     templateProvider: function ($localStorage) {
      if($localStorage.isAdmin) { //just an example, here could be any condition, like url has some params
        return '<admin></admin>';
      } else if($localStorage.isManager) {
        return '<manager></manager>';
      }
    },
how can i achieve something similar in angular 2?
for example i have such routes:
{ path: 'customers/:id', component: CustomerDetailsComponent },
{ path: 'customers/:id/edit', component: CustomerDetailsComponent }
how can i in CustomerDetailsComponent check it?
like:
  ngOnInit(): void {
    this.activatedRoute.params.subscribe(params => {
      if (params['edit']) { //how to add a condition? to split edit from show view
        /*someTemplateLogic*/
      }
    });
  }
is it possible to do?
so: two different templates for routes:
{ path: 'customers/:id', component: CustomerDetailsComponent },
{ path: 'customers/:id/edit', component: CustomerDetailsComponent }
with edit and without - how to check which route i have, and set such template in one component
 
    