This works:
function DetailsCtrl($scope, Plan){
$scope.entities = Plan.query();
}
This does not:
function DetailsCtrl($scope){
var injector = angular.injector(['myApp.services']);
var name = 'Plan';
var Entity = injector.get(name);
$scope.entities = Entity.query();
}
In the second case, no error is thrown and console.log($scope.entities) dumps the loaded entities. BUT the variables are not rendered in the template. I'm guessing the template is being loaded before the $scope is being populated with the vars. If so, how do I ensure that $scope is loaded with the vars in time?