title: Angular Toastr Callbacks
body: <p>Hi I am using Angular Toastr (<a href="https://github.com/Foxandxss/angular-toastr" rel="nofollow">https://github.com/Foxandxss/angular-toastr</a>) to create some messages on screen.  I have a maximum of two messages which can be open both at the same time at any one point in time, one which is of type error and another of type warning.  Both messages are persistent and have to be closed by the user.</p>
  
  <p>The way I'm opening the messages is like how it's explained in the instructions:</p>
  
  <pre><code>app.controller('foo', function($scope, toastr) {
      toastr.error('This is your error message', 'Error');
      toastr.warning('This is your warning message', 'Error');
  });
  </code></pre>
  
  <p>However, I would like to know when one of these is closed by the user and which one it was.  I saw on the documentation that there are callbacks onHidden and onShown which I can use however I am not aware how I can use these as there is no further info on the documentation.  Also, I saw that there is a flag isOpened to check whether a particular message is opened or not.</p>
  
  <p>Can someone tell me how I can use these callbacks to perform a particular action once any of these toastr messages is closed?  This is the first time I am using them and am struggling a bit.</p>