angular - 为什么单独的“样式”在@Component 装饰器内有一个方括号?
问题描述
我能知道为什么单独的“样式”在@Component 装饰器内有一个方括号吗?我知道 [] 用于属性绑定和数组。
@Component({
selector: 'app-component-overview',
template: '<h1>Hello World!</h1>',
styles: ['h1 { font-weight: normal; }']
})
解决方案
推荐阅读
- javascript - jQuery 追加不在 DOM 和脚本运行两次
- spring - 在 Spring Batch 的 xml 头中写入统计信息
- c# - 为什么这个命令提示符脚本不在 C# 中运行?
- django - Django 人性化 intword 删除数字轮
- reactjs - 如何在反应路由器根目录中设置通配符
- javascript - 从 Chrome 扩展程序调用 API 时出现 422 错误“无法处理的实体”
- c++ - 在我的代码中,表达式必须有一个指向对象类型的指针是什么意思?
- python - Azure 错误:数据保护系统无法创建新密钥,因为密钥的自动生成已禁用
- java - 在Java中制作随机的3字节字符串
- java - 与 Tomcat 9 的 Oracle 僵尸连接