emanuel.directive('hymn', function() {
return {
restrict: 'E',
link: function(scope, element, attrs) {
// some ode
},
templateUrl: function(elem,attrs) {
return attrs.templateUrl || 'some/path/default.html'
}
}
});
<hymn template-url="contentUrl"><hymn>
http://stackoverflow.com/questions/21835471/angular-js-directive-dynamic-templateurl
No comments:
Post a Comment