After creating a directive with a link function that includes an element with ng-include
, I'm facing issues as the ng-include
doesn't seem to be working. Anyone have any idea why this might be happening?
app.directive('helloWorld', function () {
return {
link: function (scope, elem, attrs) {
var div = document.createElement('div');
div.setAttribute('ng-include', "page2.html'");
elem.append(div);
}
};
});