-
Notifications
You must be signed in to change notification settings - Fork 585
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
Auto bind values in rootScope #84
Comments
Binding things to $rootScope is generally bad practise. Try to find another
|
Ok. Thanks for answer. |
Binding to root scope might not be a good idea but what about binding any scope... something like:
Untested proposal:
|
This is a very intriguing idea. Greg On Thu, Apr 17, 2014 at 12:29 AM, Jayson Harshbarger <
|
I started doing this in case the default is an object. What do you think?
Essentially, if both the current value and default ( |
I can do a PR if anyone is interested. |
Sounds good. I haven't tested it yet but it looks good. |
I had a problem with .bind() inside a $scope.$on('customEvent') (the binding gets lost) |
Are you proposing having a 2 way binding with the value in $scope with the value stored locally? |
I would say this should be up to the app since its trivial to do there but less so to do here. Here it needs tests, testing, more code and not everyone would use/want it. You could always make a plugin that wraps this and provides that functionality. |
I've created PR #167 for 2 way binding (so the value in angular is updated when the local storage value is changed). Would someone be able to review it and hopefully get it merged please? |
It's possible to auto bind local storage values in the rootScope ?
The text was updated successfully, but these errors were encountered: