I have created a directive with link function that contains an element with 
ng-include. 
But this element with ng-include doesn't work. 
Does anyone know why doesn't work?


app.directive('helloWorld', function () {
    return {
        link: function (scope, elem, attrs) {     
            var div = document.createElement('div');
            div.setAttribute('ng-include', "'page2.html'");
            elem.append(div);            
        }
    };
});



-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to