I\'m using directive to display html snippets.
And templateUrl inside the directive, to be able to include snippets as html file.
The directive does not wor
it seems you are trying to have different views based on some logic and you used templateUrl function but Angular interpolation was not working, to fix this issue
don't use
templateUrl
so how to do it without using templateUrl
simply like this
app.directive("myTemplate", function() {
return {
link: function(scope, elem, attrs) {
$scope.templateUrl = '/ActivityStream/activity-' + $scope.ativity.type + '.html'
},
template: ""
};
});
hope this is simple and esay to understand