These are chat archives for angular/angular-2-ionic-2

Nov 2018
André Luiz
Nov 01 2018 19:56
Hello. I'm using Ionic which comes with Angular, and I'm facing a problem. There's the App component (the main one) which initializes the app and so on. It has a @Component above the class which defines its templateUrl, in this case, it's used as the application layout (shared by all pages). The problem is, there's some pages which I need a different template, where the others will use the one already set in templateUrl. Is there a way I can define a templateUrl depending on the active route?
Luis Vargas
Nov 01 2018 19:59
in angular components should only have one template
this is because this template is precompiled
so if you want to have 2 layouts, just create two layout components and inside them put a router-outlet
André Luiz
Nov 01 2018 20:05
I don't know if this is what I need. I don't want components to have two templates, I want to components have different app templates, not just a master template that you set in App class.