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. } };
Blog for sharing my programming experience and share my codes