有两个链接(关于angularJS中element.find再addClass的行为)
静态:jsfiddle
动态(通过ng-repeat嵌套循环生成):jsfiddle
问题:
第二个代码中,为什么只有第一层的li被赋上了class('1111111111111')?
个人理解:
循环开始,从最外面到最里面;结束时,从最里面到最外面;所以判断整个ng-repeat是否结束,直接判断最外层ng-repeat是否结束即可。
我想大声告诉你2017-05-15 16:56:07
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.