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



from Angular Questions https://angularquestions.com/2017/10/17/angular-4-conditional-parent-template/
via @lzomedia #developer #freelance #web #lzomedia.com

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome