I want to do something like this in angular how can you do this?
$scope.test = "foo";
$scope.foo = "bar";
and in view
<span>{{scope[test]}}</span> <!-- and return $scope.foo that is "bar" -->
I want to do something like this in angular how can you do this?
$scope.test = "foo";
$scope.foo = "bar";
and in view
<span>{{scope[test]}}</span> <!-- and return $scope.foo that is "bar" -->