rodikh/angular-json-editor

change="evt" directive

Closed this issue · 4 comments

Hi, if you ever have time to do that - could you add some kind of "change" event on json-editor directive such that parent controller would receive those events? Currently as a workaround I created data fiddling service but this relies on the fact that I have only one json-editor. Thanks for your lib!

This might be tricky, the easiest solution would be to somehow expose the editor object for the user to bind his own change events to it, but that might be overexposing.

What sort of events would you be ok with? just global change, or do you need to listen to changes on specific fields?

As for me, I'm fine with global change

It is now possible to define a method in your scope, and pass it through the on-change attribute.
It will be called when the editor triggers the change event.

Thanks!