Angular template view with utf-8 chars doesn't

2019-07-27 09:44发布

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?

1条回答
姐就是有狂的资本
2楼-- · 2019-07-27 10:16

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.

查看更多
登录 后发表回答