app.directive('testwindow', function() {
return {
    restrict : 'E',
    template: '<ng-include src="getTemplateUrl()"/>', 
    replace: true,
    controller:function($scope, $element ,$http){

        $scope.getTemplateUrl=function(){
            var url= getWebRoot() + "/views/"+             
            $scope.dataStore.elementType +".html";
            return url;
    };
}        

是个比较好的解决方案,mark

相关文章:

  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-07-30
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2021-08-01
  • 2021-08-01
  • 2021-10-03
  • 2022-02-22
相关资源
相似解决方案