{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/1216","labels_url":"https://api.github.com/repos/angular/material/issues/1216/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/1216/comments","events_url":"https://api.github.com/repos/angular/material/issues/1216/events","html_url":"https://github.com/angular/material/issues/1216","id":54667189,"number":1216,"title":"$mdToast: Twice call of $mdToast.show raises exception","user":{"login":"mistercz","id":4592349,"avatar_url":"https://avatars.githubusercontent.com/u/4592349?v=3","gravatar_id":"","url":"https://api.github.com/users/mistercz","html_url":"https://github.com/mistercz","followers_url":"https://api.github.com/users/mistercz/followers","following_url":"https://api.github.com/users/mistercz/following{/other_user}","gists_url":"https://api.github.com/users/mistercz/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercz/subscriptions","organizations_url":"https://api.github.com/users/mistercz/orgs","repos_url":"https://api.github.com/users/mistercz/repos","events_url":"https://api.github.com/users/mistercz/events{/privacy}","received_events_url":"https://api.github.com/users/mistercz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"rschmukler","id":651740,"avatar_url":"https://avatars.githubusercontent.com/u/651740?v=3","gravatar_id":"","url":"https://api.github.com/users/rschmukler","html_url":"https://github.com/rschmukler","followers_url":"https://api.github.com/users/rschmukler/followers","following_url":"https://api.github.com/users/rschmukler/following{/other_user}","gists_url":"https://api.github.com/users/rschmukler/gists{/gist_id}","starred_url":"https://api.github.com/users/rschmukler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschmukler/subscriptions","organizations_url":"https://api.github.com/users/rschmukler/orgs","repos_url":"https://api.github.com/users/rschmukler/repos","events_url":"https://api.github.com/users/rschmukler/events{/privacy}","received_events_url":"https://api.github.com/users/rschmukler/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/material/milestones/12","labels_url":"https://api.github.com/repos/angular/material/milestones/12/labels","id":924165,"number":12,"title":"0.7.1","description":"","creator":{"login":"ThomasBurleson","id":210413,"avatar_url":"https://avatars.githubusercontent.com/u/210413?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasBurleson","html_url":"https://github.com/ThomasBurleson","followers_url":"https://api.github.com/users/ThomasBurleson/followers","following_url":"https://api.github.com/users/ThomasBurleson/following{/other_user}","gists_url":"https://api.github.com/users/ThomasBurleson/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasBurleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasBurleson/subscriptions","organizations_url":"https://api.github.com/users/ThomasBurleson/orgs","repos_url":"https://api.github.com/users/ThomasBurleson/repos","events_url":"https://api.github.com/users/ThomasBurleson/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasBurleson/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":69,"state":"closed","created_at":"2015-01-06T17:45:34Z","updated_at":"2015-02-04T04:34:02Z","due_on":"2015-02-02T06:00:00Z","closed_at":"2015-02-04T04:34:02Z"},"comments":4,"created_at":"2015-01-17T16:52:20Z","updated_at":"2015-02-18T00:20:46Z","closed_at":"2015-01-27T01:29:19Z","body":"I have service for receiving alerts messages and trying to display toasts instead of classic alerts. So service calls the showToast function\r\n\r\n```js\r\n function showToast(msg) {\r\n      var toast = $mdToast.simple()\r\n          .content(msg)\r\n          .action('OK')\r\n          .highlightAction(false)\r\n          .position('left top right');\r\n      $mdToast.show(toast);\r\n    }\r\n```\r\nWhen service receives second alert too early, the exception TypeError:undefined is not a function is displayed:\r\n\r\n```console\r\nTypeError: undefined is not a function\r\n    at Object.onRemove (http://localhost:63342/analytics/app/bower_components/angular-material/angular-material.js:6985:15)\r\n    at Object.InterimElementFactory.self.remove (http://localhost:63342/analytics/app/bower_components/angular-material/angular-material.js:1392:31)\r\n    at Object.cancel (http://localhost:63342/analytics/app/bower_components/angular-material/angular-material.js:1319:42)\r\n    at Object.show (http://localhost:63342/analytics/app/bower_components/angular-material/angular-material.js:1273:19)\r\n    at Object.showInterimElement [as show] (http://localhost:63342/analytics/app/bower_components/angular-material/angular-material.js:1211:38)\r\n    at showToast (http://localhost:63342/analytics/app/modules/shared/alert/alertSvc.js:13:16)\r\n    at Object.alertDanger (http://localhost:63342/analytics/app/modules/shared/alert/alertSvc.js:25:7)\r\n    at http://localhost:63342/analytics/app/modules/features/login/loginCtrl.js:21:22\r\n    at processQueue (http://localhost:63342/analytics/app/bower_components/angular/angular.js:13171:27)\r\n    at http://localhost:63342/analytics/app/bower_components/angular/angular.js:13187:27\r\n```\r\nI'm using bower package:\r\n\r\n```json\r\n  \"_release\": \"8aca69b4ce\",\r\n  \"_resolution\": {\r\n    \"type\": \"branch\",\r\n    \"branch\": \"master\",\r\n    \"commit\": \"8aca69b4ceb48a8a29a71d9dbe83d177a345e674\"\r\n  }, \r\n```\r\nThank you"},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/74785398","html_url":"https://github.com/angular/material/issues/1216#issuecomment-74785398","issue_url":"https://api.github.com/repos/angular/material/issues/1216","id":74785398,"user":{"login":"rschmukler","id":651740,"avatar_url":"https://avatars.githubusercontent.com/u/651740?v=3","gravatar_id":"","url":"https://api.github.com/users/rschmukler","html_url":"https://github.com/rschmukler","followers_url":"https://api.github.com/users/rschmukler/followers","following_url":"https://api.github.com/users/rschmukler/following{/other_user}","gists_url":"https://api.github.com/users/rschmukler/gists{/gist_id}","starred_url":"https://api.github.com/users/rschmukler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschmukler/subscriptions","organizations_url":"https://api.github.com/users/rschmukler/orgs","repos_url":"https://api.github.com/users/rschmukler/repos","events_url":"https://api.github.com/users/rschmukler/events{/privacy}","received_events_url":"https://api.github.com/users/rschmukler/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T00:20:46Z","updated_at":"2015-02-18T00:20:46Z","body":"After further investigation, I was able to re-create your problem. Thanks for the help!"}}