Tuesday, 15 February 2011

javascript - Bind an element's text to a property of an object set as val of element -



javascript - Bind an element's text to a property of an object set as val of element -

well..what said in question title.

i have element value set object because of generic way in set element's val plugin made @ work..

i know if can bind, using angularjs, element's text property of object setted current val..

sure, given sample object:

$scope.myobj = { name: "justin" }

html:

<input type="text" ng-model="myobj.name" />

that input bound myobj.name - editing alter object.

javascript angularjs

No comments:

Post a Comment