search

Home  >  Q&A  >  body text

angular.js - About the loop mechanism of ng-repeat in angularJS

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.

天蓬老师天蓬老师2781 days ago507

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你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.

    reply
    0
  • Cancelreply