【发布时间】:2017-06-20 01:22:54
【问题描述】:
我正在使用带有 Rails 5.1 的 Angular 4.1.3
我想在我的组件中使用 styleUrls,但出现错误。
这是错误。
zone.js?4c9b:643 Unhandled Promise rejection: Failed to load app.component.css ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app.component.css undefined
这是我的组件。
import { Component } from '@angular/core';
import template from './app.component.html'
@Component({
selector: 'app-root',
template: template,
styleUrls: ['./app.component.css']
})
export class AppComponent {
name = '';
}
这是我的文件结构
├── app
app.component.css
| ├── app.component.html
| └── app.component.ts
| └── app.module.ts
【问题讨论】:
标签: javascript angular