Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.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
Angularjs 控制器作为html中数据的语法_Angularjs - Fatal编程技术网

Angularjs 控制器作为html中数据的语法

Angularjs 控制器作为html中数据的语法,angularjs,Angularjs,我使用angular ui网格,每行的数据都以下面的方式绑定 现在我想知道在html中是否有一种控制器作为数据的语法 还是有解决办法 <div ng-entity="row.entity.periodViewModels[row.grid.columns.indexOf(col)] as entity" > <div>{{entity.FirstName}}</div> <div>{{entity.LastName}}</div> &l

我使用angular ui网格,每行的数据都以下面的方式绑定

现在我想知道在html中是否有一种控制器作为数据的语法

还是有解决办法

<div ng-entity="row.entity.periodViewModels[row.grid.columns.indexOf(col)] as entity" >
<div>{{entity.FirstName}}</div>
<div>{{entity.LastName}}</div>
<div>{{entity.Age}}</div>
</div>

现在我想知道在html中是否有一种控制器作为数据的语法?没有得到你想知道的。。你能重新措辞吗angularJS中有一个功能允许我在代码段中写上面的内容吗?你可以使用ng init=entity=row.entity.periodViewModels[row.grid.columns.indexOfcol],但我不知道ng entity指令的作用。ng entity只是我自己的发明。。。它不存在!这只是一个样本!然后可以使用ng init。。检查是否有效