-
Notifications
You must be signed in to change notification settings - Fork 278
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
bo-value does not work with ng-model #76
Comments
I tried the demo, bo-value actually set the value of the input as expected, if you inspect the DOM you can see the $index value inside the input. Apparently the problem is that ng-model ignore it. It may be a problem with priority but it's just a guess, I need to investigate more and fix it, at the moment I'll label this issue as bug. |
It seems like attrs.$observe is missing link between bo-value and ng-model. At any rate, this commit fixes it, and should fix other issues that might come up. |
@mikestopcontinues it sounds good, did you test attrs.$set enough to consider it stable? |
I put it into use at work this morning, where we use bindonce for almost everything. It's stable. |
In this fiddle, change the ng-value to bo-value, and you'll see the demo fail.
http://jsfiddle.net/NHVBW/
I can get the intended outcome (a "unwatched" value) by removing the watcher from ng-value's source, so it seems like bo-value should be able to accomplish the same thing.
I haven't spent the time to figure out how ng-model works, but my guess is that this is a order-of-events issue between ng-model and bo-value; when I inspect the rendered HTML, bo-value successfully added the 'value' attribute.
The text was updated successfully, but these errors were encountered: