-
Notifications
You must be signed in to change notification settings - Fork 703
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
$timeout & this #4
Comments
I'll just add my two cents here, because I had a similar question and Todd told me he uses
Where vm stands for ViewModel, I think it's really nice. Cheers |
Indeed I use |
👍 Another reason why I use capture variable. Nice point |
Yeah, after finding this issue and doing a bit of digging, I stumbled across your styleguide @johnpapa and I've done it the same way you suggest in this case. @toddmotto might be worth adding something to the docs in the $timeout bit to push people in the right direction? |
This is more to do with JavaScript and the lexical scope rules |
Given your controller with a $timeout:
Should I be assigning a local variable like:
The text was updated successfully, but these errors were encountered: