I'm trying to create a component with an attribute as a selector, like this:
@Component({
selector: '[my-attribute-selector]',
template: ``
})
export class MyComponent {
// Some cool stuff
}
However, tslint is complaining about that, with the following message:
[tslint] The selector of the component "MyComponent" should be used as element
I know I could just disable that tslint rule, but I'd like to know if there's a reasonable reason why I shouldn't use an attribute as the component's selector before doing so.
Thanks in advance!