user4422315
user4422315

Reputation:

styleUrls ionic - 404 (Not Found)

Does anyone know how to solve the 404 file not found for a .scss on a component :

enter image description here

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

Answers (1)

Alessandro Ornano
Alessandro Ornano

Reputation: 35402

Ionic 4:

Seems the actual styleUrls is a little bugged for relative paths. Change styleUrls with styles for example:

styles: ['favourites.scss'],

Upvotes: 2

Related Questions