angular.js - About the loop mechanism of ng-repeat in angularJS
天蓬老师
天蓬老师 2017-05-15 16:54:07
0
1
505

There are two links (about the behavior of element.find and then addClass in angularJS)
Static: jsfiddle
Dynamic (generated via ng-repeat nested loop): jsfiddle
Question:
In the second code, why is only the first layer's li assigned class('1111111111111')?
Personal understanding:
The loop starts from the outermost to the innermost; when it ends, it goes from the innermost to the outermost; so to determine whether the entire ng-repeat ends, just directly determine whether the outermost ng-repeat ends.

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
我想大声告诉你

I just started learning, and I started learning angularjs2.0 directly. I don’t want to learn 1.x, it will be outdated before I learn it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template