AngularJS directive for this?
minutephp opened this issue · 8 comments
Hi,
I think this is the best JSON editor library. But since my app is using AngularJS I was wondering if there is a AngularJS directive for using this?
When I search Google for jsoneditor angularjs
I stumble upon other libraries but nothing relevant to what I'm looking for..
I'm sure I can write the directive myself (I guess all that is needed is to add ngModel support) but I don't want to re-invent the wheel, so just want to make double sure something like this already doesn't exist?
Thanks.
Thanks. As far as I know there is no angular directive for the JSONEditor. It would be great if you could make one, I could add a link to your directive in the readme of JSONEditor for example.
Thanks for the quick reply. I will do that and send a link to you soon :)
Hi,
I've created the directive here: https://github.com/angular-tools/ng-jsoneditor
The demo can be found here:
http://jsfiddle.net/angulartools/sd3at5ek/
Please check..
thanks :)
Nice! I've added a link to the directive in the Readme of JSON Editor: https://github.com/josdejong/jsoneditor#install
It may be useful to add an (optional) delay between the changes in the JSONEditor and applying it to Angular. For larger JSON objects it could become expensive to retrieve and process the whole document with every character you type.
Thanks. You are right about that. How much delay would you suggest?
Actually I think I'll set it to 250ms and make it a configurable option
I think 205 ms would be fine. And when it's configurable there is no problem at all :)
Hi! How to block fields for edition with the directive.
Thanks!
@wagnermonteverde I think you can best ask this in the concerning project: