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
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]
})
You can write a ternary operator inline:
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: [condition ? 'someFile.css' : 'someOtherFile.css']
})