Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate $id of scope in boundScopes #252

Open
lovelylip opened this issue Oct 27, 2016 · 1 comment
Open

How to generate $id of scope in boundScopes #252

lovelylip opened this issue Oct 27, 2016 · 1 comment

Comments

@lovelylip
Copy link

    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

@aramando
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants