📜  带有属性选择器的角度组件 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:12.792000             🧑  作者: Mango

代码示例1
You googled this because you're probably confused.
Yes, both components and directives can be used via angular's attribute
selector: { selector: '[my-attribute]' }

Generally, when should I use it with components?
- To not be restricted by speciication rules:  must be a direct child of
 by the spec, you can encapsulate the rows of a table in a component via
attribute selector, for example.