将scss文件添加到Stackblitz
你能告诉我如何将scss文件添加到stackblitz吗?我试过了.但它不起作用.请看到并告诉我.
我试过添加home.html 这是项目:stackblitz
Scss应该在stackblitz中工作:
@Component({ selector: 'page-home',templateUrl: 'home.html',styleUrls: [ './home.scss' ] <== add this }) export class HomePage { 风格如 page-home { .buttoncls { 默认封装(ViewEncapsulation.Emulated)不适用于你,因为page-home不是主组件模板的一部分,而angular将类似[_ngcontent-c0]的属性添加到样式中. 所以我们可以将page-home更改为ion-list,看看它是如何工作的: Stackblitz Example (ViewEncapsulation.Emulated) 但我们可以禁用封装: encapsulation: ViewEncapsulation.None Stackblitz Example (ViewEncapsulation.None) 另见这个主题 https://github.com/stackblitz/core/issues/1 正如EricSimons在9天前评论过的那样
|