I want use of multi css in styleUrls
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: [condition 'if' for Which load css]
})
i tired
You can use a ternary operator inside:
const url1 = './foo.css';
const url2 = './bar.css';
let condition = true
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: [condition ? url1 : url2]
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With