标签:
accepted
|
There‘s no way to do this. See https://github.com/angular/angular.js/issues/263. Depending on what you‘re doing you can use a boolean to just not going into the body of the loop. Something like: var keepGoing = true; angular.forEach([0,1,2], function(count){ if(keepGoing) { if(count == 1){ keepGoing = false; } } }); |
标签:
原文地址:http://my.oschina.net/u/2357525/blog/510647