Rajib Mahmud Rajib Mahmud - 1 month ago 11
AngularJS Question

How can I cope with the language system in angular.js?

I want to make a filter input . but is facing a problem which I couldn’t solve.

My files are given below :

Idioms and phrase.html

<!DOCTYPE html>
<html>
<script src= "angular.js"></script>
<body>
<div ng-app="myApp" ng-controller="EnglishCtrl">
<p>Filtering input:</p>
<p><input type="text" ng-model="test"></p>
<ul>
<li ng-repeat="x in English | filter:test | orderBy:'English'">
{{ (x.English | lowercase) + ', ' + x.Bangla }}
</li>
</ul>
</div>
<script src="namesController.js"></script>
</body>
</html>


namesController.js

var app = angular.module('myApp', [])
app.controller('EnglishCtrl', function($scope) {
$scope.English = [
{English:'A black sheep', Bangla:'কুলাঙ্গার'},

];
});


and the angular.js file what we know .

But when I run it , it gives me the following ---

enter image description here

Why ?

I want to live . please help me.

Answer

Try setting <meta> charset

<meta charset="utf-8" />

Code shown works fine in this demo

Comments