1

我希望 ng-include 具有像 \'customer\'+{{action}}+\'.html\' 这样的值

.directive('tabContent',function(){
return {
    restrict: 'E',
    template:'<div ng-if="view==\'customer\'+{{action}}+\'.html'\" ng-include="\'{{action}}.html\'"></div>',
    link: function(scope, elem, attrs) {
        scope.action = attrs.action;
    }
}

})

如何在值 ng-include 硬编码值和范围值中组合。
谢谢,
        奥马尔

4

1 回答 1

1

您的 ng-include 应该如下所示正确。

ng-include="action + \'.html\'"></div>',
于 2015-10-18T13:45:59.923 回答