Open ThomasPe opened 8 years ago
Well, yeah, something like that would be the usage, I suppose. As close as the normal ASF usage as possible.
Have you looked closer to see if it easy to break out a directive from the application?
Took a quick look, and the code seems really nice, it should be pretty easy to break that out.
I'm currently working on that. There's some functionality in there that does not belong into the library IMHO, like saving forms or notifying the user of changes (locker, growl). But the code is well-structured, so it's certainly possible. I'll have to read up on some angular convetions & best practices first, though.
Please do, it would be a killer feature if you could get that done.
I'm gonna need this for my masters thesis, so eventually I'll have to ;-)
Good choice. :-)
I'm partial to: https://github.com/johnpapa/angular-styleguide The material repo also has a jscs file that follows Google code guide with minor differences, but I haven't looked into the builder enough to know how appropriate that is, however it would be nice to follow the same guides across all js implementations within the org. That's my 2c :)
Thanks, I'll give it a look and try to abide by it.
So we can work towards a common goal I'd like to discuss how exactly the Json Schema Builder should be used / called / included. I created a small "Basic Usage" example based on the Angular Schema Form Example. As I see it, it should be enough to just have a $scope.schema and a $scope.form (and an optional $scope.options) object for passing & receiving data, right?
Here's what I think it could look like (from my fork)
First, expose your (existing) schema and form to the $scope.
Then load them into the Schema Form Builder using the
sfbSchema
andsfbForm
directives.Thoughts?