My code is like this:
function enableUser(Restangular, $state, notification) {
...
...
notification.log(
{{ "DISABLED_LOG_DISABLE" | translate }},
{ addnCls: 'humane-flatty-success' });
}
I found that it will display {{ "DISABLED_LOG_DISABLE" | translate }}
directly to the screen but what I need is Disabled employee
when I give it {'DISABLED_LOG_DISABLE': 'Disabled employee'}
This expression is used in HTML file "{{ "DISABLED_LOG_DISABLE" | translate }" What you should do is inject $translate and then you call it. For example:
$translate('DISABLED_LOG_DISABLE').then(function(translatedString) {...})
I guess you are using angular-translate.