$destroy event called after $state change (angular ui)
<p>i m using ui router for state management. i have some directives that are behaving as listeners of some events   </p>

<pre><code>  app.directive('signer', ['Constant', "GlobalService", 
    function (constant, globalService) {
     return {
            restrict: "A",
            scope: {},
  link: function (scope, element) {
var workflowLoaded;
 workflowLoaded = scope.$on('event:workflowLoaded', function (data) {
                globalService.performAction();
            });

scope.$on('$destroy', function () {                
                if (workflowLoaded) workflowLoaded();               
            });
  }
      }
    }]);
</code></pre>

<p><strong>Scenario</strong> : 
user navigating from one <strong>view to other view</strong>  that contains <strong>Signer</strong> directive which reloads the directive</p>

<p><strong>Issue</strong>:
when item.html loads it register for event, but as $destory called after $statechangesuccess it de-register the event.</p>

<p>how to resolve the issue, any help will be appreciated</p>

<p>they have discussed it here but i cant find the solution 
<a href="https://github.com/angular-ui/ui-router/issues/2485" rel="nofollow">https://github.com/angular-ui/ui-router/issues/2485</a></p>