{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/26490","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/26490/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/26490/comments","events_url":"https://api.github.com/repos/angular/angular/issues/26490/events","html_url":"https://github.com/angular/angular/issues/26490","id":370795214,"node_id":"MDU6SXNzdWUzNzA3OTUyMTQ=","number":26490,"title":"Directive class selector tslint error","user":{"login":"miikaeru","id":28813834,"node_id":"MDQ6VXNlcjI4ODEzODM0","avatar_url":"https://avatars3.githubusercontent.com/u/28813834?v=4","gravatar_id":"","url":"https://api.github.com/users/miikaeru","html_url":"https://github.com/miikaeru","followers_url":"https://api.github.com/users/miikaeru/followers","following_url":"https://api.github.com/users/miikaeru/following{/other_user}","gists_url":"https://api.github.com/users/miikaeru/gists{/gist_id}","starred_url":"https://api.github.com/users/miikaeru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miikaeru/subscriptions","organizations_url":"https://api.github.com/users/miikaeru/orgs","repos_url":"https://api.github.com/users/miikaeru/repos","events_url":"https://api.github.com/users/miikaeru/events{/privacy}","received_events_url":"https://api.github.com/users/miikaeru/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-16T20:53:47Z","updated_at":"2018-10-16T22:47:56Z","closed_at":"2018-10-16T22:47:56Z","author_association":"NONE","body":"<!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Performance issue\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n[ ] Other... Please describe:\r\n</code></pre>\r\n\r\n## Current behavior\r\nWhen using a class selector in a directive tslint is showing an error. According the [Angular documentation](https://angular.io/api/core/Directive#selector) using a class selector should be allright. My definition is (It's working fine) :\r\n\r\n![image](https://user-images.githubusercontent.com/28813834/47046696-0bea3c80-d196-11e8-8b31-b0a81efed0ef.png)\r\n\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\nTslint error shouldn't be shown.\r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!--\r\nFor bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).\r\n-->\r\nUse a class as a directive selector\r\n\r\n```ts\r\n@Directive({\r\n  selector: '.form-control'\r\n})\r\n```\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n<!-- Describe the motivation or the concrete use case. -->\r\nCommenting our or disable the tslint rule shouldn't be the way to go\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nAngular version: 6.1.2\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\nBrowser:\r\n- [ ] Chrome (desktop) version XX\r\n- [ ] Chrome (Android) version XX\r\n- [ ] Chrome (iOS) version XX\r\n- [ ] Firefox version XX\r\n- [ ] Safari (desktop) version XX\r\n- [ ] Safari (iOS) version XX\r\n- [ ] IE version XX\r\n- [ ] Edge version XX\r\n \r\nFor Tooling issues:\r\n- Node version: XX  <!-- run `node --version` -->\r\n- Platform:  <!-- Mac, Linux, Windows -->\r\n\r\nOthers:\r\n<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->\r\n</code></pre>\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/430427892","html_url":"https://github.com/angular/angular/issues/26490#issuecomment-430427892","issue_url":"https://api.github.com/repos/angular/angular/issues/26490","id":430427892,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQyNzg5Mg==","user":{"login":"IgorMinar","id":216296,"node_id":"MDQ6VXNlcjIxNjI5Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/216296?v=4","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T22:47:56Z","updated_at":"2018-10-16T22:47:56Z","author_association":"MEMBER","body":"While Angular does support class selectors for directives, this feature should be used only in special circumstances because it makes it hard to understand which parts of the template are regular classes and which are directives. This is why this syntax is tslint warning and not a compilation error.\r\n\r\nIf you insist on using this selector style, you can change the tslint config, or prefix the callsite in the code with tslint ignore comment, but you'll make your life and other's life easier if you stick to attribute selectors instead."}}
{"actor":{"display_login":"IgorMinar"}}