[nativescript-platform-css] Not picking the style when using className


Hi there, I am creating Labels on the fly and I need to set a style to the Label, in my component, I import the css file but its not picking up the correct style, this is my code:

let title = new Label();
title.text = "My Title";
title.className = "font-16 my-title";
title.color = new Color("black");

This is my css:

.phone :host .my-title {

Any idea? Thanks!


Are you using Angular?


Hey @manojdcoder, yes I am using Angular (~6.1.0).

Any idea?