I’m using Angular-translate to translate my ionic 1 application. I’m able to translate the title of the popup but unfortunately I couldn’t add css for the title. Reason for apply css is that to apply the custom font face through css.
I’ve studied this stackoverflow answer as well.
http://stackoverflow.com/questions/32636833/ionic-how-to-use-cssclass-in-ionicpopup
As per the example I’ve included the css style in the external css file but it won’t apply it.
Here is my code.
var invalidUserPopup = $ionicPopup.alert({
title: '<span class="{{lang}}">' + $filter('translate')('Error') + '</span>',
template: '<span class="{{lang}}">{{"Invalid_Username_or_Password" | translate}}</span>',
okText: $filter('translate')('Error') ,
});
Here i’m changing the css class according to the selecte language and it is totally working the alert template (body). But it is not working with the title and the buttons.
This is the css class i want to apply
/font class for changing the sinhala language/
.sinhala {
font-family: ‘DL-Araliya…’;
font-weight: 100;
font-style: normal;
}
/font class for changing the tamil language/
.ti {
font-family: ‘Bamini’;
font-weight: 100;
font-style: normal;
}
Any suggestions?