Constructor and Description |
---|
AbstractModule() |
Modifier and Type | Method and Description |
---|---|
void |
bind(com.asayama.gwt.angular.client.JSModule jso)
This method is used to bind the underlying AngularJS module object to
the Java wrapper.
|
<P extends Provider<?>> |
config(Class<P> klass,
Configurator<P> configurator)
Configures a provider prior to obtaining the factory from it.
|
Module |
constant(String name,
Object value)
Defines a value as a service to the module.
|
<C extends Controller> |
controller(Class<C> klass)
Registers a controller component with the module.
|
<D extends Directive> |
directive(Class<D> klass)
Registers a directive component with the module.
|
<S extends Service> |
factory(Class<S> klass)
Deprecated.
|
<S extends Service> |
factory(Factory<S> factory)
Registers a service object factory with the module, so that the service
object is created if/when it is requested.
|
<F extends Filter> |
filter(Class<F> klass)
Registers a filter component with the module.
|
String |
getName()
Returns the name of the module.
|
abstract void |
onModuleLoad() |
<C extends ClientResources> |
resources(Class<C> klass)
This is an experimental feature.
|
<S extends Service> |
service(Class<S> klass)
Registers a service class with the module, so that the service object is
created if/when it is requested.
|
<S extends Service> |
service(S service)
Registers a service object with the module.
|
Module |
value(String name,
Object value)
Defines a value as a service to the module.
|
public abstract void onModuleLoad()
onModuleLoad
in interface Module
onModuleLoad
in interface com.google.gwt.core.client.EntryPoint
public void bind(com.asayama.gwt.angular.client.JSModule jso)
Module
public String getName()
Module
Angular
class methods for more details.public Module value(String name, Object value)
Module
public Module constant(String name, Object value)
Module
public <F extends Filter> Module filter(Class<F> klass)
Module
// Derived name is "myFilter". Java package is omitted. filter(com.example.MyFilter.class);
public <D extends Directive> Module directive(Class<D> klass)
Module
// Derived name is "myDirective". Java package is omitted. // Attribute directive usage is<div data-my-directive>
// Class directive usage is<div class="my-directive">
// Element directive usage is<my-directive>
directive(com.example.MyDirective.class);
public <S extends Service> Module service(S service)
Module
public <S extends Service> Module service(Class<S> klass)
Module
factory(new DefaultFactory(com.example.MyService.class));
@Deprecated public <S extends Service> Module factory(Class<S> klass)
public <S extends Service> Module factory(Factory<S> factory)
Module
new
or GWT.create()
, then there is
a convenience method Module.service(Class)
.public <P extends Provider<?>> Module config(Class<P> klass, Configurator<P> configurator)
Module
Configurator
to configure the provider injected into
the module.public <C extends Controller> Module controller(Class<C> klass)
Module
// Derived name is "com.example.MyController". factory(com.example.MyController.class);
controller
in interface Module
public <C extends ClientResources> Module resources(Class<C> klass)
Binds ClientBundle to the scope via controller pattern.
Copyright © 2014. All rights reserved.