@Target(value=FIELD) public static @interface Injector.Inject
var myApp = angular.module('myApp', []); myApp.controller('fooController', [ 'bar', function fooController(bar) { bar.baz(); });Similar code can be written in GWT Angular as follows.
public class FooController implements Controller {
@Injector.Inject
Bar bar;
public void onControllerLoad() {
bar.baz();
}
}
public class MyApp extends AbstractModule implements EntryPoint {
public void onModuleLoad() {
Angular.module(this);
this.controller(FooController.class);
}
}
public abstract String value
Copyright © 2015. All rights reserved.