Home
Sign Up
Sign In
V2EX
›
Angular
ng-repeat 用了多个$index, 怎样定位不同的$index?
AlanZhang
·
Dec 12, 2014
· 10845 views
This topic created in 4360 days ago, the information mentioned may be changed or developed.
ng-repeat="certification in product.certifications track by $index"
ng-repeat="standards in certification.standards track by $index"
这两个$index都需要定位到。
repeat=
index
track
3 replies
•
2014-12-12 11:13:54 +08:00
L42y
Dec 12, 2014
1
1
用 `ngRepeat`:
https://docs.angularjs.org/api/ng/directive/ngInit
The only appropriate use of ngInit is for aliasing special properties of ngRepeat
L42y
Dec 12, 2014
1
2
不好意思,应该是用 ngInit
AlanZhang
OP
Dec 12, 2014
3
非常感谢。 就是这个。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1826 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms ·
UTC 15:47
·
PVG 23:47
·
LAX 07:47
·
JFK 10:47
♥ Do have faith in what you're doing.
❯