I know @Kevin has already answered ur question, but you can also do something like this using '$filter'.
var translations = {
HEADLINE: 'What an awesome module!',
PARAGRAPH: 'Srsly!',
NAMESPACE: {
PARAGRAPH: 'And it comes with awesome features!'
}
};
var app = angular.module('myApp', ['pascalprecht.translate']);
app.config(['$translateProvider', function ($translateProvider) {
// add translation table
$translateProvider.translations(translations);
}]);
app.controller('Ctrl', ['$scope', '$filter', function ($scope, $filter) {
$scope.headline = $filter('translate')("HEADLINE");
$scope.paragraph = $filter('translate')("PARAGRAPH");
$scope.namespaced_paragraph = $filter('translate')("NAMESPACE.PARAGRAPH");
}]);
and pass the scope variables to the alert you want to show.
and i think with this approach you don't have to pass your each and every filter(if at all more than one) to the controller and achieve the same result.