directive

return {
        restrict: 'E',
        replace: true,
        templateUrl: 'app/view/order.html',
        link: function (scope, element, attrs) {
            scope.Type = attrs.Type;
        }
      };

模板

 <div ng-switch on="item.Type">
   <div ng-switch-when="1"><ng-include src="'views/1.html'"></ng-include></div>
   <div ng-switch-when="2"><ng-include src="'views/2.html'"></ng-include></div>
   <div ng-switch-when="3"><ng-include src="'views/3.html'"></ng-include></div>
 </div>

相关文章:

  • 2021-09-10
  • 2022-12-23
  • 2021-10-01
  • 2021-11-11
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
猜你喜欢
  • 2021-04-02
  • 2022-01-02
  • 2022-02-06
  • 2021-06-25
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
相关资源
相似解决方案