Reputation: 24492
I upgraded the angular(2.1.2)and angular-cli version to latest, and I get the following error for each component I have:
ERROR in ./src/app/members/view-news/view-news.component.ts
Module not found: Error: Can't resolve 'view-news.component.css' in 'c:\xampp\htdocs\myapp\src\app\members\view-news'
@ ./src/app/members/view-news/view-news.component.ts 74:21-55
@ ./src/app/app.module.ts
@ ./src/app/index.ts
@ ./src/main.ts
@ multi main
Although the file view-news.component.css
exists in the same folder of the view-news.component.ts
and worked in previous version. What's wrong?
Upvotes: 2
Views: 13256
Reputation: 583
here is my Solution
In my case
path is like this "node_modules/jquery/dist/jquery.min.js",
i have corrected it by
"./node_modules/jquery/dist/jquery.min.js",
Actual Code
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
],
Upvotes: 0
Reputation: 51
Make sure you change the comments tag from <dom-element>
to 'test.html' if you have it surrounding with test.html
it will fail.
Upvotes: 0