Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在angular.js中调用ng title属性上的scope函数_Javascript_Angularjs_Scope_Attributes - Fatal编程技术网

Javascript 如何在angular.js中调用ng title属性上的scope函数

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不调用该函数

这是我的html代码

 <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指令?如果使用它,请确保在项目中包含的源代码。