angular - 为什么 styleurls 使用方形后退,而 templateurl 不使用?
问题描述
@Component({
selector: 'app-heroes',
templateUrl: './heroes.component.html',
styleUrls: ['./heroes.component.css']
我的问题是为什么它使用方括号而其他人不使用?
解决方案
您不能拥有multiple templates
组件single
,但您可以different styles
配置简单组件。
这就是为什么你有styleUrls
as 数组。
推荐阅读
- jquery - 代码在函数内部时不运行
- javascript - ElectronJS ReferenceError:未定义导航器
- python - Pandas - 选择其他列行满足两个条件的索引
- assembly - 程序集 x86 中的分段错误
- python - 如何定义具有动态属性的类?
- android - 录制音频时 Firebase 模拟器测试失败
- date - Google 表格中的多年服务公式
- angular - 如何配置我的角度库以使用正确安装的 RxJS 链接它进行本地测试?
- html - JSON:删除尾随逗号后仍然存在尾随逗号错误?
- bash - 带有破折号的bash函数名称是不好的做法吗?