I am following the Angular tutorial on their website and I created some components, templates and styles.
I am having trouble including my styles in the components using the 'styleURLs' property of the '@Component' decorator. This is what I have,
@Component({
selector: 'curries',
templateUrl: '../Views/curries.component.html',
styleUrls: ['../../../assets/styles/curries.component.css'],
providers: [CurryService]
})
export class CurriesComponent { // blah blah
As one can see, I put my styles inside the 'assets/styles' folder.
This is my folder structure,
/src
/app
/Views
/Components
/curries.component.ts
/Services
/Models
/assets
/images
/styles
-curries.component.css
I want to know if this is even possible; to have a style document in a different folder and have it referenced in the component.
I am just trying to de-clutter my files in the app directory, and I read somewhere that the images and styles need to be in the 'assets' folder (which is kind of a 'Content' folder, hence it makes sense)
Any help is appreciated :)
p.s. This is the error I get when I build the app
ERROR in ./src/app/Components/curries.component.ts
Module not found: Error: Can't resolve
'../../../assets/styles/curries.component.css' in
'~\AngularProjects\HelloWorld\src\app\Components'
resolve '../../../assets/styles/curries.component.css' in
'~\AngularProjects\HelloWorld\src\app\Components'using
description file: ~\AngularProjects\HelloWorld\package.json (relative
path: ./src/app/Components)