在IE Mobile(windows phone 8)的href标签中无法识别Angularjs变量

Angularjs variable is not recognized in href tag in IE Mobile(windows phone 8)

本文关键字:标签 识别 变量 Angularjs href Mobile IE windows phone      更新时间:2023-09-26

我正在使用cordova和angularjs开发windows phone 8应用程序。在href中不能识别Angularjs的变量。我的代码示例在这里:

<a href="link/{{id}}">name</a>

{{id}}不被识别,链接不工作。

有什么建议吗? ?

如果你想在<a>标签的href中使用插值变量,那么你应该使用ng-href指令。

<a ng-href="link/{{id}}">name</a>