pisapapiros pisapapiros - 1 year ago 277
AngularJS Question

Ionic back button translation

I can customize the back button text in my Ionic project like this:

function ($ionicConfigProvider) {

Now I'm trying to translate it. I use angular-translate in my project:


But the translate filter seems to be unavailable during config phase. Is there any way of overcoming this issue or any better way of translating the back-button text?

Update: please note this is not about how to use the translate filter during config phase, but how to translate the back button properly.

Thanks in advance

Answer Source

You can change the text of the back button threw the HTML:

<ion-nav-back-button class="button-clear">
  <i class="icon ion-ios7-arrow-back"></i> 

To use Angular-translate:

<ion-nav-back-button class="button-clear">
  <i class="icon ion-ios7-arrow-back"></i> 
  {{'BACK' | translate}}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download