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?

I went back to work on this and figured out how to do what I needed. It was simpler than I imagined. All I had to do was create a function like this:
This function injects a new CSS Style into the page, that way I can replace the entire style on the page.
NOTE 1 The file MUST be inside
/assets.NOTE 2 The file MUST be
.css, cannot be.scss.NOTE 3 No need to add the file path in "styles" inside
angular.json, nor in @Component inside myapp.component.ts.