1
我使用的是一个Angular 2组件,它遵循属性,并且在Chrome桌面浏览器中工作正常。Angular 2 ViewEncapsulation.Native vs ViewEncapsulation.Emulated问题在铬的iPad和铬浏览器
@Component({
selector: 'some-header',
templateUrl: './someheader.component.html',
styleUrls: ['./someheader.component.scss'],
encapsulation: ViewEncapsulation.Native
})
但在我的iPad上的Chrome浏览器,它是给我在页面加载以下错误
hostEI.createShadowRoot is undefined
但是,当我将其更改为
ViewEncapsulation.Emulated
它开始在我的iPad上运行,但我的UI在桌面上打破了。
我检查以下链接计算器
但我的问题是,我可以根据组件的装饰一定条件下动态地添加此encapsulation
属性。
感谢
[网络组件polyfills(https://www.webcomponents.org/polyfills/)应该做的伎俩 –
感谢这就是我一直在寻找:) – Rishi