Answer the question
In order to leave comments, you need to log in
How to solve cyrillic problem in angular?
In general, there is a form that is responsible for entering and registering. If the login and password are not correct, then angular displays an error in the scope. But the problem is that the error needs to be displayed in Ukrainian and the browser displays it like this:
This is how I display the error:
$scope.login = function(form){
Authentication.login(form,function(data){
$scope.user = data;
$scope.modalLogin = false;
},function(error){
if(error.message=='Incorrect data'){
error.message = "Не вірне ім'я або пароль"
}
$scope.loginError = error;
});
};
<code ng-show="loginError">{{loginError.message}}
Answer the question
In order to leave comments, you need to log in
The source code file in which you display the error is probably saved in cp1251.
Resave it as UTF8 without BOM.
The problem is not with angular, but with the charset of the page/response.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question