angularjs - Angular dynamically assigning object does not bind -


i trying dynamically assign object property value not change.

when try $scope[key] = $scope.model[val];

where $scope.model[val] object contains title property {{title}} not show

but if set $scope[key] = {"title":"abc"}; works

can please me make 1st case work.

thanks

try following code

$scope.key = json.parse($scope.model[val]);


Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -