I would like to add attributes to the custom selector I create in the angular 2 component implementation.
@Component({
selector: 'my-node', // add attributes to this selector
template: `<div> <ng-content></ng-content> </div>`
})
So that when I do <my-node> The dom generates the selector with these extra attributes
<my-node flex="25" layout="row">
I don't want to hard code these attributes every time I do <my-node>. I want those attributes to be part of the selectors constructed template.
Something like this is what Im looking for but not seeing anything like it in the api
@Component({
selector: 'my-node',
selectorAttributes: `layout="row"` // generates <my-node layout="row">
template: `<div> <ng-content></ng-content> </div>`
})