{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/8847","repository_url":"https://api.github.com/repos/angular/material","labels_url":"https://api.github.com/repos/angular/material/issues/8847/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/8847/comments","events_url":"https://api.github.com/repos/angular/material/issues/8847/events","html_url":"https://github.com/angular/material/issues/8847","id":162174259,"number":8847,"title":"md-chip-remove & $event.stopPropagation() not working","user":{"login":"didibanane","id":9786806,"avatar_url":"https://avatars.githubusercontent.com/u/9786806?v=3","gravatar_id":"","url":"https://api.github.com/users/didibanane","html_url":"https://github.com/didibanane","followers_url":"https://api.github.com/users/didibanane/followers","following_url":"https://api.github.com/users/didibanane/following{/other_user}","gists_url":"https://api.github.com/users/didibanane/gists{/gist_id}","starred_url":"https://api.github.com/users/didibanane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/didibanane/subscriptions","organizations_url":"https://api.github.com/users/didibanane/orgs","repos_url":"https://api.github.com/users/didibanane/repos","events_url":"https://api.github.com/users/didibanane/events{/privacy}","received_events_url":"https://api.github.com/users/didibanane/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/material/labels/type:%20enhancement","name":"type: enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"DevVersion","id":4987015,"avatar_url":"https://avatars.githubusercontent.com/u/4987015?v=3","gravatar_id":"","url":"https://api.github.com/users/DevVersion","html_url":"https://github.com/DevVersion","followers_url":"https://api.github.com/users/DevVersion/followers","following_url":"https://api.github.com/users/DevVersion/following{/other_user}","gists_url":"https://api.github.com/users/DevVersion/gists{/gist_id}","starred_url":"https://api.github.com/users/DevVersion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevVersion/subscriptions","organizations_url":"https://api.github.com/users/DevVersion/orgs","repos_url":"https://api.github.com/users/DevVersion/repos","events_url":"https://api.github.com/users/DevVersion/events{/privacy}","received_events_url":"https://api.github.com/users/DevVersion/received_events","type":"User","site_admin":false},"assignees":[{"login":"DevVersion","id":4987015,"avatar_url":"https://avatars.githubusercontent.com/u/4987015?v=3","gravatar_id":"","url":"https://api.github.com/users/DevVersion","html_url":"https://github.com/DevVersion","followers_url":"https://api.github.com/users/DevVersion/followers","following_url":"https://api.github.com/users/DevVersion/following{/other_user}","gists_url":"https://api.github.com/users/DevVersion/gists{/gist_id}","starred_url":"https://api.github.com/users/DevVersion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevVersion/subscriptions","organizations_url":"https://api.github.com/users/DevVersion/orgs","repos_url":"https://api.github.com/users/DevVersion/repos","events_url":"https://api.github.com/users/DevVersion/events{/privacy}","received_events_url":"https://api.github.com/users/DevVersion/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-06-24T15:41:09Z","updated_at":"2016-06-30T13:57:20Z","closed_at":null,"body":"Hello, actually working a lot with md-chip which i like pretty much. I encounter several problems. Most of time because the doc is not complete. This time I couldn't find a working solutions in any other place.\r\n\r\nmy code :\r\n```\r\n<button class=\"md-chip-remove\"\r\n    md-chip-remove\r\n    ng-click=\"$event.stopPropagation(); ctrl.function($chip);\">\r\n    // ng-click=\"ctrl.function($chip, $event);\">\r\n    <md-icon md-svg-icon=\"md-close\"></md-icon>\r\n </button>\r\n```\r\nI use sweetAlert when the user click on the close 'x' of a chip when he wants to remove it. He can click on cancel or confirm the suppression.\r\nthe problem is, $event.stopPropagation(); doesn't stop the propagation of the event and remove the md-chip in every cases. Even before the user can click on cancel or confirm.\r\n\r\nThe only thing I could do is to add again the removed chip to my list of chips if the user clicked on cancel. But that not something i ll be satisfied with.\r\n\r\nwe got :\r\nmd-on-add\texpression\t\r\nAn expression which will be called when a chip has been added.\r\n\r\nmd-on-remove\texpression\t\r\nAn expression which will be called when a chip has been removed.\r\n\r\nBut we got nothing that is called so we could stop the add or remove action.\r\nsomething like : md-on-click boolean\r\nwhich will do the action only when the boolean is true and will wait if it's false.\r\nit's a kind of delay.\r\n\r\nBut all this wouldn't be necessary if we could stop the propagation on the remove :)\r\n"},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/229665916","html_url":"https://github.com/angular/material/issues/8847#issuecomment-229665916","issue_url":"https://api.github.com/repos/angular/material/issues/8847","id":229665916,"user":{"login":"DevVersion","id":4987015,"avatar_url":"https://avatars.githubusercontent.com/u/4987015?v=3","gravatar_id":"","url":"https://api.github.com/users/DevVersion","html_url":"https://github.com/DevVersion","followers_url":"https://api.github.com/users/DevVersion/followers","following_url":"https://api.github.com/users/DevVersion/following{/other_user}","gists_url":"https://api.github.com/users/DevVersion/gists{/gist_id}","starred_url":"https://api.github.com/users/DevVersion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevVersion/subscriptions","organizations_url":"https://api.github.com/users/DevVersion/orgs","repos_url":"https://api.github.com/users/DevVersion/repos","events_url":"https://api.github.com/users/DevVersion/events{/privacy}","received_events_url":"https://api.github.com/users/DevVersion/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T13:57:20Z","updated_at":"2016-06-30T13:57:20Z","body":"@gseabrook Thanks for the Pull Request.\r\n\r\n---\r\n\r\nDoes your PR allow developers to cancel / interrupt the `remove` action?\r\n\r\nI actually thought it would make more sense to register [this](https://github.com/angular/material/blob/master/src/components/chips/js/chipRemoveDirective.js#L39-L42) event after the element was transcluded correctly.\r\n\r\nThis would allow developers to just stop propagation of the event the followed\r\n```html\r\n<button class=\"md-chip-remove\" \r\n    md-chip-remove\r\n    ng-click=\"$event.stopPropagation();\">\r\n  <md-icon md-svg-icon=\"md-close\"></md-icon>\r\n</button>\r\n```"}}
{"actor":{"display_login":"DevVersion"}}