-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Fixing getLocalizedString filter to select the first matched object because it returns an array!
getLocalizedString: function(KEY) {
// default the result to an empty string
var result = '';
// make sure the dictionary has valid data
if (localize.resourceFileLoaded) {
// use the filter service to only return those entries which match the KEY
// and only take the first result
var entry = $filter('filter')(localize.dictionary, function(element) {
return element.key === KEY;
}
)[0]; // get the first matched
// set the result
result = entry.value;
}
// return the value to the call
return result;
}
Metadata
Metadata
Assignees
Labels
No labels