I am using ng-show with a custom function. This function calls '$translate.use'-method inside the controller.
Funny enough, this works for the main-page but not for all other controllers although all of them use the same peace of code.
The console tells me that $translate is undefined.
Here's my peace of code for the index-page:
app.controller('LangCtrl', function ($scope, $translate) {
$scope.isenglish = function () {
if ($translate.use() == 'en_US') {
return true;
}
return false;
}........
and for another controller:
app.controller('selectFormController', ['$scope', '$http', 'storage', '$rootScope', function ($scope, $http, storage, $rootScope, $translate) {
........
$scope.isenglish = function () {
if ($translate.use() == 'en_US') {
return true;
}
return false;
}
I am really puzzled - is anybody able to help me out?
Thanks a lot!!! Steffen