This topic contains 4 replies, has 2 voices, and was last updated by Euan 9 years, 2 months ago.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Plugins › AngularJS › How to stop binding updates firing UI change events
Tagged: Angular, angularjs, API, event, fire event, interface, one-way binding, programmatically, Widget
This topic contains 4 replies, has 2 voices, and was last updated by Euan 9 years, 2 months ago.
I have an app that displays a number of sliders that are updated from the server with a %http.get and json. The sliders use this same object for the values. When a user moves the slider I want to post the new value back to the server. Above each slider I also have a numeric input box for precise value input. This uses the same data object value.
I have a mess that when one is updated the other updates, and they all fire their update events even though it wasn’t a user interface change. Is there away to stop the events firing when the value is changed from the binding?
Hello Euan,
Generally speaking, widget events are fired both when changes are made manually and via the widgets’ API.
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/
OK,
Is it then possible to make it such that when the slider is moved, and the change event is called to take the new value but then cancel the update. I can then do a post to the server of the caught value, which will then be fed back to the model via its periodic update?
Something like a directive jx-noupdate. In effect a 1-way binding?
Angular only seem to have a one time binding, no 1-way binding.
Hi Euan,
The features provided by the jqxAngular plug-in are specified in the jQWidgets Integration with AngularJS help topic, but, unfortunately, your requirement is not one of them. It may, however, be possible to achieve this with a more JavaScript/jQuery-oriented approach.
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/
Yes I guess I either need to make a new slider control, or modify the standard one if possible.
I have made my own “checkbox” for 3-way updating and it works well in that case.
You must be logged in to reply to this topic.