javascript - AngularJS "dot rule" with an existing JSON model -
what recommended approach implementing dot notation required angular models when actual model not have them?
my models created on server python/django, inputs required edit properties require more advanced command standard html inputs. create directive perform these duties. problem directives maintain synced must follow "dot rule". require set isolated scope of directive object has property. however, if directive created work on property not object there no dot notation use.
what choices here? alter server code homecoming unnecessary additional property appease angular?
write messy wrapper watch actual property , add together object angular can maintain track of (and same in reverse update real property when property of wrapper object changed)?
or missing obvious?
thanks,
paul
you should utilize controller syntax
<div ng-controller="pagecontroller main"> <input type="text" ng-model="main.abc"> </div>
javascript json angularjs model
No comments:
Post a Comment