Javascript 如何在angular.js中调用ng title属性上的scope函数
这是我的html代码Javascript 如何在angular.js中调用ng title属性上的scope函数,javascript,angularjs,scope,attributes,Javascript,Angularjs,Scope,Attributes,这是我的html代码 <td ng-title="tileOfAbsent(this.attendance.absent)" ng- style="IsAbsOrPres(this.attendance.absent)" style="color: red"> {{attendance.absent}}</td> 问题是tileOfAbsent函数未执行(我已使用断点检查)。但是,isasorpres函数按预期执行 为什么ng title不调用该函数
<td ng-title="tileOfAbsent(this.attendance.absent)" ng-
style="IsAbsOrPres(this.attendance.absent)" style="color: red">
{{attendance.absent}}</td>
问题是tileOfAbsent
函数未执行(我已使用断点检查)。但是,isasorpres
函数按预期执行
为什么ng title
不调用该函数
我用
title
而不是ng title
比如,title=“{{tileOfAbsent(this.attention.缺席)}”
这是我的全部工作代码
<td title="{{tileOfAbsent(this.attendance.absent)}}" ng-style="IsAbsOrPres
(this.attendance.absent)" style="color: red">{{attendance.absent}}</td>
{{出席.缺席}
我是通过使用title
而不是ng title
比如,title=“{{tileOfAbsent(this.attention.缺席)}”
这是我的全部工作代码
<td title="{{tileOfAbsent(this.attendance.absent)}}" ng-style="IsAbsOrPres
(this.attendance.absent)" style="color: red">{{attendance.absent}}</td>
{{出席.缺席}
我是通过使用title
而不是ng title
比如,title=“{{tileOfAbsent(this.attention.缺席)}”
这是我的全部工作代码
<td title="{{tileOfAbsent(this.attendance.absent)}}" ng-style="IsAbsOrPres
(this.attendance.absent)" style="color: red">{{attendance.absent}}</td>
{{出席.缺席}
我是通过使用title
而不是ng title
比如,title=“{{tileOfAbsent(this.attention.缺席)}”
这是我的全部工作代码
<td title="{{tileOfAbsent(this.attendance.absent)}}" ng-style="IsAbsOrPres
(this.attendance.absent)" style="color: red">{{attendance.absent}}</td>
{{出席.缺席}
什么是ng title
指令您能给我们看一下文档吗?是angular内置指令吗?ngTitle
指令的来源是什么?您是否尝试过使用标题?不能随意将ng-
作为属性的前缀,并期望发生任何事情看起来ng attr是AngularJS 1.1.4中的一个新指令,您可以在这种情况下使用。
请参阅此链接::您使用的是ng title
,而不是ng attr title
。所以再说一次:您是否理解Angular没有附带ngTitle指令?如果您使用它,请确保在您的项目中包含in的源代码。什么是ng title
指令您能给我们看一下该文档吗?是angular内置指令吗?ngTitle
指令的来源是什么?您是否尝试过使用标题?不能随意将ng-
作为属性的前缀,并期望发生任何事情看起来ng attr是AngularJS 1.1.4中的一个新指令,您可以在这种情况下使用。
请参阅此链接::您使用的是ng title
,而不是ng attr title
。所以再说一次:您是否理解Angular没有附带ngTitle指令?如果您使用它,请确保在您的项目中包含in的源代码。什么是ng title
指令您能给我们看一下该文档吗?是angular内置指令吗?ngTitle
指令的来源是什么?您是否尝试过使用标题?不能随意将ng-
作为属性的前缀,并期望发生任何事情看起来ng attr是AngularJS 1.1.4中的一个新指令,您可以在这种情况下使用。
请参阅此链接::您使用的是ng title
,而不是ng attr title
。所以再说一次:您是否理解Angular没有附带ngTitle指令?如果您使用它,请确保在您的项目中包含in的源代码。什么是ng title
指令您能给我们看一下该文档吗?是angular内置指令吗?ngTitle
指令的来源是什么?您是否尝试过使用标题?不能随意将ng-
作为属性的前缀,并期望发生任何事情看起来ng attr是AngularJS 1.1.4中的一个新指令,您可以在这种情况下使用。
请参阅此链接::您使用的是ng title
,而不是ng attr title
。所以再说一次:您是否理解Angular没有附带ngTitle指令?如果使用它,请确保在项目中包含的源代码。