您可以执行以下操作:
<div ng-repeat="group in groups"> {{ group.name }} <div ng-repeat="section in sections" ng-include="getIncludeFile(section)"> <!-- Dynamic section template used --> </div></div>然后在您的控制器中:
$scope.getIncludeFile = function(section) { // Make this more dynamic, but you get the idea switch (section) { case "Section A": return 'partials/sectiona.html'; case "Section B": return 'partials/sectionb.html'; }}然后,您的sectiona.html可能如下所示(具有特定于该文件的控制器):
<div ng-controller="SectionAController"> <!-- HTML in here, and can bind straight to your SectionAController --></div>



