2014-02-07 16:00:47 -05:00
|
|
|
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,
|
2014-02-07 16:00:47 -05:00
|
|
|
link: linker,
|
|
|
|
|
scope: {
|
|
|
|
|
key: '@'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|