Reputation:
Does anyone know how to solve the 404 file not found for a .scss on a component :
this is my .ts file
I would assume this is how you connect your styling the .scss and the .ts is in the same calendar/ directory
@Component({
selector: 'calendar',
styleUrls: **['calendar.component.scss']**,
templateUrl: 'calendar.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
Has anyone else stumbled upon this issue. I have tried :
styleUrls: ['calendar.component.scss'], styleUrls: ['./calendar.component.scss'], also :
in the app.scss, like so :
@import '../components/calendar/calendar'
@import '../components/calendar/calendar/calender.component.scss'
all attempts are unsuccessful. Any thoughts?
Upvotes: 5
Views: 1393
Reputation: 35402
Seems the actual styleUrls
is a little bugged for relative paths.
Change styleUrls
with styles
for example:
styles: ['favourites.scss']
,
Upvotes: 2