All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gwt.angular.client.Angular Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package com.google.gwt.angular.client;

import elemental.util.ArrayOf;

import java.util.Iterator;

/**
 * @author Andrei Korzhevskii ([email protected])
 */
public class Angular {

  public static native void bootstrap(String moduleName) /*-{
      $wnd.angular.bootstrap($doc, [moduleName]);
  }-*/;

  public static  Iterable iterable(final ArrayOf array) {
    return new Iterable() {
      public Iterator iterator() {
        return new Iterator() {
          int next = 0;

          public boolean hasNext() {
            return next < array.length();
          }

          public S next() {
            return array.get(next++);
          }

          public void remove() {
          }
        };
      }
    };
  }

}