{"action":"created","issue":{"url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/181","labels_url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/181/comments","events_url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/181/events","html_url":"https://github.com/jirikavi/AngularJS-Toaster/issues/181","id":122852421,"number":181,"title":"Toaster does appear twice when called from modal view.","user":{"login":"ekiziltas","id":13187734,"avatar_url":"https://avatars.githubusercontent.com/u/13187734?v=3","gravatar_id":"","url":"https://api.github.com/users/ekiziltas","html_url":"https://github.com/ekiziltas","followers_url":"https://api.github.com/users/ekiziltas/followers","following_url":"https://api.github.com/users/ekiziltas/following{/other_user}","gists_url":"https://api.github.com/users/ekiziltas/gists{/gist_id}","starred_url":"https://api.github.com/users/ekiziltas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekiziltas/subscriptions","organizations_url":"https://api.github.com/users/ekiziltas/orgs","repos_url":"https://api.github.com/users/ekiziltas/repos","events_url":"https://api.github.com/users/ekiziltas/events{/privacy}","received_events_url":"https://api.github.com/users/ekiziltas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T00:31:48Z","updated_at":"2015-12-18T01:55:54Z","closed_at":null,"body":"Dear All, I have really hard issue about calling a toaster from ui-modal.That is, if you define toaster containers in both modal calling screen and ui-modal, then toaster popups appear twice, as it is detailed earlier with the issue number #132. However, toaster container should be capable of allowing toaster message to display only in the current active view (which is supposed to be in modal view not in the modal calling view).\r\n\r\nAs far as I investigate the earlier issues, I have only found one closed issue (#132) which is closed with the solution of declaring container once, but I think there is a necessity to cover this need globally not interim solution.Since, as a addicted user of AngularJS-Toaster, I have linked lots of workflows with the callback function of the messages and it is inevitable that this capability would be the basics of the toaster in near future.\r\n\r\nRegards."},"comment":{"url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/comments/165637686","html_url":"https://github.com/jirikavi/AngularJS-Toaster/issues/181#issuecomment-165637686","issue_url":"https://api.github.com/repos/jirikavi/AngularJS-Toaster/issues/181","id":165637686,"user":{"login":"Stabzs","id":11450848,"avatar_url":"https://avatars.githubusercontent.com/u/11450848?v=3","gravatar_id":"","url":"https://api.github.com/users/Stabzs","html_url":"https://github.com/Stabzs","followers_url":"https://api.github.com/users/Stabzs/followers","following_url":"https://api.github.com/users/Stabzs/following{/other_user}","gists_url":"https://api.github.com/users/Stabzs/gists{/gist_id}","starred_url":"https://api.github.com/users/Stabzs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stabzs/subscriptions","organizations_url":"https://api.github.com/users/Stabzs/orgs","repos_url":"https://api.github.com/users/Stabzs/repos","events_url":"https://api.github.com/users/Stabzs/events{/privacy}","received_events_url":"https://api.github.com/users/Stabzs/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T01:55:54Z","updated_at":"2015-12-18T01:55:54Z","body":"If you insist on using two unique `toast-container` elements, you can (and in your case should) use unique toaster ids per container since that way you can deliberately target a container.\r\n\r\nNow, that said, if you use the same 'animation' position, they'll simply layer over one another and then you'll be unable to see your second toasts.  However, based on what you've described, it sounds like you've already dealt with this issue.\r\n\r\nI've created an example for you here:  http://plnkr.co/edit/4ICtcrpTSoAB9Vo5bRvN?p=preview\r\n\r\nAs an aside, I absolutely disagree that the library should be responsible for understanding the state of the \"view\" layer of your application.  It shouldn't care what the active view is, where the active view is, or how you define active view.  Rather, you should maintain your views and use the tools the library has at it's disposal to properly target the correct container.\r\n\r\nHope this helps."}}