I'm using IonicFramework to create a mobile app and I want to set the back button text to "Back", but since my app is in several languages I'm using the $translate
service to translate the "Back" string to the proper language
This crashes the app since services aren't allowed to be injected in the app.config block.
Any ideas how to solve it? Here is my code:
app.config(function($ionicConfigProvider, $translate) {
$translate('label_back').then(function(translation){
$ionicConfigProvider.backButton.text(translation);
});
});