File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 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 {
5858 return renderer ;
5959 }
6060
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 {
6265 renderer = new EmulatedRenderer ( type , this . rootNgView , this . zone , this . viewUtil ) ;
6366 ( < EmulatedRenderer > renderer ) . applyToHost ( element ) ;
64- } else {
65- renderer = this . defaultRenderer ;
6667 }
6768
6869 this . componentRenderers . set ( type . id , renderer ) ;
@@ -253,9 +254,12 @@ class EmulatedRenderer extends NativeScriptRenderer {
253254 private addStyles ( styles : ( string | any [ ] ) [ ] , componentId : string ) {
254255 styles . map ( s => s . toString ( ) )
255256 . map ( s => replaceNgAttribute ( s , componentId ) )
256- . forEach ( addCss ) ;
257+ . forEach ( addStyleToCss ) ;
257258 }
259+ }
258260
261+ function addStyleToCss ( style : string ) : void {
262+ addCss ( style ) ;
259263}
260264
261265function replaceNgAttribute ( input : string , componentId : string ) : string {
You can’t perform that action at this time.
0 commit comments