Files
Archetype/app/directives/archetypeLocalize.js
T

21 lines
456 B
JavaScript
Raw Normal View History

angular.module("umbraco.directives").directive('archetypeLocalize', function (archetypeLocalizationService) {
var linker = function (scope, element, attrs){
var key = scope.key;
archetypeLocalizationService.localize(key).then(function(value){
if(value){
element.html(value);
}
});
}
return {
restrict: "E",
2014-08-13 11:05:27 -04:00
replace: true,
link: linker,
scope: {
key: '@'
}
}
});