angularjs ng-model fails with variable name binding when value does not
exists with plnkr
I have to create a form in which meta data is coming from server . So I
can not use hard code variable binding. Say I have a column definition
studentcol that has an expression and display name.
$scope.studentcol = {expression:"studentid","display":"name"} $scope.data
= {};
If I use . It get failed. It will work properly either I use hard code
expression say data.studentid.display or value for studentid already
exists in data then above binding works well
http://plnkr.co/edit/YBt37TuILz1KsPOUAo9q?p=preview
Please suggest
Rohit Bansal
No comments:
Post a Comment