我在 oclazyload 示例中发现的类似的东西
angular.module("LazyLoadTest", ["oc.lazyLoad"])
.controller("TestController", function($scope, $ocLazyLoad, $compile) {
$ocLazyLoad.load("js/testApp.js").then(function() {
console.log('loaded!!');
var el, elToAppend;
elToAppend = $compile('<say-hello to="world"></say-hello>')($scope);
el = angular.element('#example');
el.append(elToAppend);
}, function(e) {
console.log('errr');
console.error(e);
})
});