Something like this which i found in oclazyload example

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);
                })
            });
0

There are 0 answers