Declare ng-include directive in a div.
<div ng-include src="view.getView()"></div>
// And add a directive in your angular controller
$scope.view = {
getView: function() {
return "partials/" + $scope.obj + ".html";
// or get it from ajax based on some criteria.
}
};
<div ng-include src="view.getView()"></div>
// And add a directive in your angular controller
$scope.view = {
getView: function() {
return "partials/" + $scope.obj + ".html";
// or get it from ajax based on some criteria.
}
};
Comments
Post a Comment