-
Notifications
You must be signed in to change notification settings - Fork 11
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
Automated model creation #9
Comments
Hi Neville, |
Hi John, |
Hi Neville, var newModel={};
GDB({
teacher: newModel
},{ implicitModel: true });//new user option property
GDB.modelAppendFromDOM();//new public method <input data-bindto="teacher.name" type="text">
<input data-bindto="teacher.email" type="email"> Changes to the bound elements or a call to the Let me know your thoughts on this. Thanks, |
Hi John, Back to your example. In my write-less code world I'd see something more like:
|
Something I've been thinking about recently is the ability to create a model by parsing the specified dom branch. Most of my use for 2 way bindings is with Bootstrap Modal dialogs.
So I'd call a function passing it the root element of the dialog and it would look for
data-bindto="xyz"
attributes and return an object that represented the model.I appreciate that this may only work for simpler models, but that's fine for my use case.
-Neville
The text was updated successfully, but these errors were encountered: