{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/14575","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/14575/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/14575/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/14575/events","html_url":"https://github.com/angular/angular.js/issues/14575","id":153772193,"number":14575,"title":"ng-attr-custom-directive matches with customDirective","user":{"login":"OmarNaghmouchi","id":16443055,"avatar_url":"https://avatars.githubusercontent.com/u/16443055?v=3","gravatar_id":"","url":"https://api.github.com/users/OmarNaghmouchi","html_url":"https://github.com/OmarNaghmouchi","followers_url":"https://api.github.com/users/OmarNaghmouchi/followers","following_url":"https://api.github.com/users/OmarNaghmouchi/following{/other_user}","gists_url":"https://api.github.com/users/OmarNaghmouchi/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarNaghmouchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarNaghmouchi/subscriptions","organizations_url":"https://api.github.com/users/OmarNaghmouchi/orgs","repos_url":"https://api.github.com/users/OmarNaghmouchi/repos","events_url":"https://api.github.com/users/OmarNaghmouchi/events{/privacy}","received_events_url":"https://api.github.com/users/OmarNaghmouchi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20$compile","name":"component: $compile","color":"e102d8"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20breaking%20change","name":"needs: breaking change","color":"e11d21"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20feedback","name":"needs: feedback","color":"bfdadc"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20bug","name":"type: bug","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/105","html_url":"https://github.com/angular/angular.js/milestones/1.6.x","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/105/labels","id":1317216,"number":105,"title":"1.6.x","description":null,"creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":14,"state":"open","created_at":"2015-09-21T20:16:38Z","updated_at":"2016-05-12T12:40:27Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-05-09T13:07:36Z","updated_at":"2016-05-17T10:13:02Z","closed_at":null,"body":"**Use case**: I wanna append an attribute (_directive_) depending on a condition.\r\nUsing _ng-attr-custom-directive_ to add _custom-directive_ dynamically to an element.\r\n\r\n**Issue**: _customDirective_ matches with _ng-attr-custom-directive_ : My directive is instantiated and 'executed'.\r\n**Expected**: _customDirective_ doesn't match with  _ng-attr-custom-directive_ , after execution of the _ng-attr_ directive, it append or not, depending on the evaluation of the expression, and then, if appended, 'execute' the directive.\r\n\r\nA plnkr showing the issue : \r\nhttps://plnkr.co/edit/J1XKP7XWqvSEa6feoWmR"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/219675910","html_url":"https://github.com/angular/angular.js/issues/14575#issuecomment-219675910","issue_url":"https://api.github.com/repos/angular/angular.js/issues/14575","id":219675910,"user":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T10:13:02Z","updated_at":"2016-05-17T10:13:02Z","body":"Afaik, `ng-attr-foo` doesn't *really* allow you to remove the foo property - it allows you to add the `foo` attribute with an interpolated value. If you use it without an interpolated value, it doesn't add `foo`, and if you have an interpolated value, then there's no way to remove the attribute completely.\r\n\r\nSo I don' think figuring out if  `foo` gets added is difficult. It'll be added if the attribute contains interpolation.\r\n\r\nAnd @gkalpak I'm not really sure if your comment concludes that you think the current behavior is correct or that we should change it. ;)"}}