Angular template view with utf-8 chars doesn't work

o k picture o k · Sep 11, 2016 · Viewed 13.9k times · Source

I try to use "ngroute" to load html templates.
Everything works fine, but when I try to show words in Hebrew in the "ng-view", I get only question marks instead of the Hebrew chars (???????????).
in the <head> tag I added <meta charset="utf-8"> and if the Hebrew is static in the page it works fine. but when I use "ngroute" to load it it doesn't.

<head>

<!-- start: Meta -->
<meta charset="utf-8">
<title></title>
<!-- end: Meta -->

<script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>

<script src="js/controllers.js"></script>

<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<!-- end: CSS --></head>

Any idea? Is there anything I should add to the html view page?

Answer

o k picture o k · Sep 11, 2016

I added the <meta meta charset=utf-8> tag to the all the templates html and not just to the <head> and it fixed the problem.