I am having following directive:
app.directive('renderPartial', function($compile) {
return {
restrict: "AE",
link: function(scope, element, attrs) {
var path = getPartial(attrs.module, attrs.file);
//path = /abc/some_file.html
scope[attrs.model] = path;
var el = $compile('<div ng-include="attrs.model"></div>')(scope);
element.html(el);
}
}
});
In my view:
<render-partial module="abc" file="some_file" model="some_model"></render-partial>
Now for some reason this is not working, no errors. But file is not getting rendered.
Plunkr for my problem: http://plnkr.co/edit/CkTE2pV4i5LvL60NEYfE