Files
Archetype/app/directives/archetypeLocalize.js
T
2015-06-01 12:12:33 -04:00

21 lines
456 B
JavaScript

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",
replace: true,
link: linker,
scope: {
key: '@'
}
}
});