This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Backport selector to component #14032
Open
Description
The fact that a component is restricted to "E" would be useful to add the property "selector" as in angular2. In my case I have an attribute directive to order the columns of a table based on the value of a field.
Another parent directive coordinate sorting and update a two-way binded variable.
When trying to convert to a component should be able to write:
.component("tr", {
selector: "tr['sort']",
bindings: {
sort: "=sort"
},
controller: controllers.Tr
})
.....
.component("th", {
selector: "th['sortby']",
require: {
ngSort: "^tr"
},
controller: controllers.Th,
bindings: {
fieldName: "@sortby"
},
so the componets will be tied only to the elements that need it.