I am trying to extend the ng-include
directive with this:
module.directive('incComp', [function () {
return {
template: "<div ng-include=\"'app/component/{{incComp}}/template.html'\"></div>"
};
}]);
and I use it like this:
<div inc-comp="counter"></div>
but the get request that goes out is for:
/app/component/%7B%7BincComp%7D%7D/template.html
I'm not sure how to get it insert the value of the inc-comp attribute rather than just using the literal value in the template string. I got the notion of doing this from this SO question (2nd answer).