angular-hotkeys icon indicating copy to clipboard operation
angular-hotkeys copied to clipboard

How to generate $id of scope in boundScopes

Open lovelylip opened this issue 8 years ago • 1 comments

    if (!(scope.$id in boundScopes)) {

      // Add the scope to the list of bound scopes
      boundScopes[scope.$id] = [];

      scope.$on('$destroy', function () {
        var i = boundScopes[scope.$id].length;
        while (i--) {
          _del(boundScopes[scope.$id].pop());
        }
      });
    }

how boundScopes generate $id for scope?, if i use action: 'keyup' or 'keydown', boundScopes not del old hotkeys

lovelylip avatar Oct 27 '16 03:10 lovelylip

The $id property is added by Angular when a scope is constructed, and is unique to each scope within the lifecycle of the application; see here. I doubt it's the cause of the issue.

aramando avatar Feb 22 '17 11:02 aramando