Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular component with attribute selector

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: <tr> must be a direct child of
<tbody> by the spec, you can encapsulate the rows of a table in a component via
attribute selector, for example.

 	<tbody>
    	<tr *ngFor="let dataRow of data" my-attribute [data]="data"></tr>
 	</tbody>
 
PREVIOUS NEXT
Tagged: #angular #component #attribute #selector
ADD COMMENT
Topic
Name
5+7 =