Use of "for...of" in ng-repeat
<p>Looking through ng-repeats source, it doesn't look like theres any instance of it using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of" rel="nofollow">for-of</a>. Is there any custom directive that does this or some other way of achieving this loop in templates to make use of iterator functions?</p>

<p><strong>Class with iterator</strong></p>

<pre><code>class Cache{

  constructor(items){
    this.cache = {
      "one" : 1,
      "two" : 2
    };
  };

  // custom iterator that turns our cache into an array
  // for use in "for...of" loops
  [Symbol.iterator](){
    var index = 0;
    // turn cache object into array of its values (underscore method)
    var data = _.values(this.cache);

    return {
      next: function(){
        if(index &lt; data.length){
          return {
            value: data[index++],
            done: false
          };
        }else{
          return { done:true };
        }
      }
    };
  };

};

var myCache = new Cache();
// looping my cache in simple js would look like
for(let val of myCache){
  console.log(val);
}
// 1, 2
</code></pre>

<p><em>proposed angularjs ng-repeat directive</em></p>

<pre><code>&lt;ul&gt;
  &lt;li ng-repeat="item in myCache track by $index"&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>However that does not work as ng-repeat does not implement <code>for...of</code>. My question is: is there a way to get the ng-repeat directive to work nicely with iterators with <em>minimal interface changes</em>, or better yet, a custom directive identical to ng-repeat that is made for <code>for...of</code> loops?</p>