styleUrls ionic - 404(未找到)

5 sass ionic-framework

有谁知道如何解决在组件上找不到 .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)

所有的尝试都没有成功。有什么想法吗?

Ale*_*ano 2

离子4:

似乎实际的styleUrls相对路径有点问题。更改styleUrls例如styles

styles: ['favourites.scss'],