I want to set different styles for my app, depending on a URL parameter (that I already got).
I tought to do something like this:
let dynamicCSS;
@Component({
selector: 'app',
templateUrl: './app.component.html',
styleUrls: [require('./app.component.css'), require('./app.component.' + dynamicCSS + '.css')],
encapsulation: ViewEncapsulation.None
})
export class App.........
But in this case, the "require" says: "Cannot be found", and I don't know how to access my dynamicCSS
variable from my ngOnInit()
.
How can I solve this?