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

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

android - MPAndroidChart - How to add Annotations or images to the chart -