javascript - Unexpected number when passing value in AngularJs -
i getting below error when passing value $scope.formdata.field_happy.und.0.value
.
uncaught syntaxerror: unexpected number
but if passing binding model seems work. can't figure out doing wrong.
<input type="checkbox" ng-model="formdata.field_staff_interaction.und.0.value" >
this posting drupal services api endpoint. format need.
in javascript can't myarray.0
. instead, should myarray[0]
. so, in case, correct form is:
$scope.formdata.field_staff_interaction.und[0].value
it "works" ng-model
because directive has syntax, in myarray.0
valid.
Comments
Post a Comment