File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,12 @@ export class NativeScriptRendererFactory implements RendererFactory2 {
58
58
return renderer ;
59
59
}
60
60
61
- if ( type . encapsulation === ViewEncapsulation . Emulated ) {
61
+ if ( type . encapsulation === ViewEncapsulation . None ) {
62
+ type . styles . map ( s => s . toString ( ) ) . forEach ( addStyleToCss ) ;
63
+ renderer = this . defaultRenderer ;
64
+ } else {
62
65
renderer = new EmulatedRenderer ( type , this . rootNgView , this . zone , this . viewUtil ) ;
63
66
( < EmulatedRenderer > renderer ) . applyToHost ( element ) ;
64
- } else {
65
- renderer = this . defaultRenderer ;
66
67
}
67
68
68
69
this . componentRenderers . set ( type . id , renderer ) ;
@@ -253,9 +254,12 @@ class EmulatedRenderer extends NativeScriptRenderer {
253
254
private addStyles ( styles : ( string | any [ ] ) [ ] , componentId : string ) {
254
255
styles . map ( s => s . toString ( ) )
255
256
. map ( s => replaceNgAttribute ( s , componentId ) )
256
- . forEach ( addCss ) ;
257
+ . forEach ( addStyleToCss ) ;
257
258
}
259
+ }
258
260
261
+ function addStyleToCss ( style : string ) : void {
262
+ addCss ( style ) ;
259
263
}
260
264
261
265
function replaceNgAttribute ( input : string , componentId : string ) : string {
You can’t perform that action at this time.
0 commit comments