0

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.

Cù Đức Hiếu
  • 5,569
  • 4
  • 27
  • 35
  • Sir , please give me some resources since now i am novice in react @Abdennour TOUMI – Rajib Mahmud Oct 30 '16 at 16:48
  • First of all , see this example : https://jsfiddle.net/abdennour/69z2wepo/61297/ .. this is the basic example – Abdennour TOUMI Oct 30 '16 at 16:52
  • then , go to [this page](https://egghead.io/technologies/react) and choose one of courses there to start. – Abdennour TOUMI Oct 30 '16 at 16:54
  • This has nothing to do with Angular. You're expecting the browser to use Unicode without being told to expect it, and then feeding it Unicode characters. See @charlietfl's solution. The default configuration for most browsers is to use ISO-8859-1, which has no support for Hindi characters - that's why you need to tell the browser to use Unicode of which UTF-8 is just one version. Edit: http://stackoverflow.com/questions/12406066/does-html5-specify-a-default-character-encoding-for-html-documents-if-no-charact – Akshat Mahajan Oct 30 '16 at 16:55

1 Answers1

0

Try setting <meta> charset

<meta charset="utf-8" />

Code shown works fine in this demo

charlietfl
  • 170,828
  • 13
  • 121
  • 150