Search Posts

Category: templates

Angular 4: Conditional parent template

On Angular 4, assuming that I have 5 components/routes and certain sets use specific parent templates, e.g.: a.component –> parent component b.component, c.component –> parent2 component e.component, f.component –> parent3 component Currently, the parent template is handled by app.component and child components are rendered inside a tag, say, <router-outlet>. My questions is, is there a way to make the parent template conditional based on the rules stated above? Thank you. Source: AngularJS