如何在角度指令属性中使用特殊字符? [英] How can I use special characters in angular directives attributes?

查看:77
本文介绍了如何在角度指令属性中使用特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在自定义angularJS指令的属性中使用包含德语字符(Ä,Ö,Ü)的字符串.

I would like to use strings including german characters (Ä, Ö, Ü) in attributes of a custom angularJS directive.

例如:

<my-custom-directive my-label="Lärm" />

另一个示例是 ui.bootstrap.tabs 指令:

<tabset>
   <tab heading="Lärm"> content ... </tab>
   <tab heading="Second Heading"> content ... </tab>
</tabset>

这将导致标题为"Lrm"的选项卡.有什么想法吗?

This results in a tab with heading "L�rm". Any ideas?

推荐答案

通常,在一个好的编辑器中,您可以更改文档的编码类型,将文档保存在其中.尝试将其设置为iso-8859-1/utf-8并再次保存/上传.

Usually in a good editor you can change the document encoding type, the document is saved in. try to set it to iso-8859-1/utf-8 and save/upload again.

下一个选择是使用

<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

乌姆劳族人经常被审判&错误...

Umlauts often is trial & error...

这篇关于如何在角度指令属性中使用特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆