One of my Angular components has two different StyleSheets for a dark and light theme. These should now be displayed depending on which theme is active (normally set via function, in the example simplified by timer). Is it possible to reload only the styling of the Angular component, without reloading the component (and possibly loaded data) completely?
let styleTest = ['button.component.light.scss'];
@Component({
selector: 'button',
templateUrl: 'button.component.html',
styleUrls: styleTest,
})
export class ButtonComponent implements OnInit {
constructor() {
}
public ngOnInit() {
setTimeout(() => {
styleTest = ['button.component.dark.scss'];
}, 5000);
}
}