angularjs-oauth / oauth-ng

AngularJS directive for the OAuth 2.0 Implicit Flow
http://angularjs-oauth.github.io/oauth-ng/
MIT License
363 stars 156 forks source link

$routeChangeSuccess and $stateChangeSuccess callbacks are broken #117

Closed bramski closed 8 years ago

bramski commented 8 years ago

This most recent change in the directive...

      // Hack to update the directive content on logout
      // TODO think to a cleaner solution
      scope.$on('$routeChangeSuccess', function () {
        init();
      });

      scope.$on('$stateChangeSuccess', function () {
        init();
      });

completely breaks my application as it causes all of the $broadcast events to refire.