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

Uncaught TypeError: Cannot read property 'invoke' of undefined #12

Open
moneytree-doug opened this issue Apr 3, 2015 · 2 comments
Open

Comments

@moneytree-doug
Copy link

This code snippet wasn't working with the argument document, but it worked with document.body.
https://github.com/bahmutov/code-snippets/blob/master/ng-idle-apply-timing.js

@ghost
Copy link

ghost commented Dec 4, 2015

I face the same problem. I use angular 1.3.

@zavrakv
Copy link

zavrakv commented Sep 7, 2019

This code snippet wasn't working with the argument document, but it worked with document.body.
https://github.com/bahmutov/code-snippets/blob/master/ng-idle-apply-timing.js

I face the same problem. I use angular 1.3.

It doesn't work, because you should specify your ng-app element instead of document.body
Just change this line: angular.element(document.body).injector().invoke(timeApply);

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