有谁知道如何解决在组件上找不到 .scss 的 404 文件:
这是我的 .ts 文件
我会假设这是你如何将你的样式连接到 .scss 和 .ts 是在同一个 calendar/ 目录中
@Component({
selector: 'calendar',
styleUrls: **['calendar.component.scss']**,
templateUrl: 'calendar.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
Run Code Online (Sandbox Code Playgroud)
有没有其他人偶然发现这个问题。我试过了 :
styleUrls: ['calendar.component.scss'], styleUrls: ['./calendar.component.scss'], 还有:
在 app.scss 中,像这样:
@import '../components/calendar/calendar'
@import '../components/calendar/calendar/calender.component.scss'
Run Code Online (Sandbox Code Playgroud)
所有的尝试都没有成功。有什么想法吗?
| 归档时间: |
|
| 查看次数: |
1259 次 |
| 最近记录: |