public class NGScope
extends com.asayama.gwt.jsni.client.JSON
$scope
object. In order
to inject $scope
into your Angular component, you can simply declare
it as a component's property, and annotate it with @Injector.Inject
,
e.g.
public class MyController implements Controller {
@Injector.Inject
NGScope scope;
public void onControllerLoad() {
scope.put("name", "World!");
}
}
Another use of this interface is to inject $rootScope
into your
Angular component, e.g.
public class MyRunnable implements Runnable {
@Injector.Inject
("$rootScope")
NGScope scope;
public void run() {
scope.put("greeting", "Hello");
}
}
Modifier | Constructor and Description |
---|---|
protected |
NGScope() |
Modifier and Type | Method and Description |
---|---|
static NGScope |
create() |
void |
digest() |
<T> T |
get(String key) |
getBoolean, getDate, getDouble, getInteger, getJSArray, getJSClosure, getJSFunction, getJSObject, getJSON, getLong, getObject, getString, keys, parse, put, put, put, put, put, put, put, put, put, put, put, put, toJSONString
_checkUndefined, $boolean, $boolean, $date, $date, $double, $double, $integer, $integer, $jsarray, $jsarray, $jsobject, $jsobject, $long, $long, $object, $object, $string, $string, eval, toJavaScript
Copyright © 2015. All rights reserved.