Circular output list Many projects in the Web services, the front-end to do a template after the end of the write JSP code, both sides need to work closely to distinguish responsibility. Some projects from the backend to provide restful method, front-end use Ajax call their own loops, this is generally a lot of jquery Scrabble string, too not intuitive, someone out of the JS template, also no good where to go.
It's much better with ANGULARJS, and syntax is similar to JSP:
ng-repeat instruction life on an element that requires cyclic content, the items and the variable names on the controller correspond, and item is an alias for an individual object in the array. $index can return the ordinal number of the currently referenced object, starting with 0, plus $first, $middle, $last can return a Boolean value to tell you whether the current element is the last element in the first middle of the collection.