-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locale.getString sometimes give empty string in angular controller #115
Comments
Hi @PRIYA-MAMGAIN ... that is strange, could you provide a full example please? |
Allan most of the times it doesn't show up. If you see the locale.getString() method, it gets the bundle and check if the bundle is loading it returns empty string. Html: ..... $scope.myDataGrid={ aoColumns:[ oLanguage: { } If I put a check in my controller to do processing only when the locale is ready, then my dataTable is empty . locale.ready("app").then(function(){ |
So it seems like you should be wrapping the entire locale.ready('app').then(function() {
$scope.myDataGrid = { /* ... */ };
}); |
Hi
I am passing parameters to dataTable
oLanguage: {
"sLengthMenu": "MENU "+locale.getString('app.menu-dropdown'),
"sSearch": locale.getString('app.search'),
"sEmptyTable": locale.getString('app.emptyTable'),
"sZeroRecords": locale.getString('app.zeroRecord'),
"sInfoFiltered": locale.getString('app.filtereddevices', ['MAX'])+ ')',
"sInfo": locale.getString('app.showingdevices' ,['START','END','TOTAL']),
"sInfoEmpty": locale.getString('app.emptyRecord')
}
Most of the times i do not get the labels in my datatable and locale.getString() return blank. I tried accessing the strings when locale is ready, ie
locale.ready("app").then function(){
$scope.emptyTable=locale.getString('app.emptyTable')
}
when i access the $scope.emptyTable it still returns empty string.
The text was updated successfully, but these errors were encountered: