Angular 在./src/app/app.component.ts模块中找不到错误:错误:Can';t解析'/app.component.css';
应用程序组件.tsAngular 在./src/app/app.component.ts模块中找不到错误:错误:Can';t解析'/app.component.css';,angular,Angular,应用程序组件.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'user-service-client'; } Angular CLI版本:8.
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'user-service-client';
}
Angular CLI版本:8.0.6
如何解决此错误:
ERROR in ./src/app/app.component.ts
Module not found: Error: Can't resolve './app.compone
确保app.module设置正确
或
模块有声明
或者根据角度指南,项目结构内部出现问题…您的问题是什么?如何解决此错误:未找到./src/app/app.component.ts模块中的错误:错误:无法解决“./app.component.css”乍一看似乎是正确的。你是如何建立这个项目的?您是否使用了
ng new
?是的,如果您只是通过ng service
启动它,您会遇到此错误?