public interface Controller
onControllerLoad()
.
User defined controllers supporting this interface must be registered with the user's module in order for it to be visible to the framework. For example,
public class MyModule extends AbstractModule implements EntryPoint { public void onModuleLoad() { Angular.module(this); controller(MyController.class); } } class MyController implements Controller { String name; public void onControllerLoad() { name = "World!"; } public String getName() { return name; } }
Modifier and Type | Method and Description |
---|---|
void |
onControllerLoad()
This method is called when the user supplied controller is loaded by the
framework.
|
void onControllerLoad()
$scope
is handled by
GWT Angular, rather than requiring the user to write the binding by hand.
This reduces the need for custom implementation of
onControllerLoad()
, and hence an no-op implementation of this
method is provided by AbstractController
.
Copyright © 2015. All rights reserved.