How may I add a string(css-class) to the parent Component? Different pages should be able to add a class to the container element.
app.component.ts:
@Component({
selector: 'app-root',
template: `
<div class="container {{ ADD HERE }}">
<router-outlet></router-outlet>
</div>
`
})
export class AppComponent {
title = 'app works!';
}
page1.component.ts:
@Component({
template: `
<p>I'm page 1!</p>
`
})
export class Page1Component {
containerClasses = "page-1";
}