use of com.google.template.soy.bididirectives.BidiDirectivesModule in project closure-templates by google.
the class SharedModule method configure.
@Override
protected void configure() {
// Install the core directives.
install(new CoreDirectivesModule());
// Install default directive and function modules.
install(new BasicDirectivesModule());
install(new BidiDirectivesModule());
install(new BasicFunctionsModule());
install(new BidiFunctionsModule());
install(new I18nDirectivesModule());
// Create the API call scope.
GuiceSimpleScope apiCallScope = new GuiceSimpleScope();
bindScope(ApiCallScope.class, apiCallScope);
// Make the API call scope instance injectable.
bind(GuiceSimpleScope.class).annotatedWith(ApiCall.class).toInstance(apiCallScope);
// Bind unscoped providers for parameters in ApiCallScope (these throw exceptions).
bind(String.class).annotatedWith(LocaleString.class).toProvider(GuiceSimpleScope.<String>getUnscopedProvider()).in(ApiCallScope.class);
bind(BidiGlobalDir.class).toProvider(GuiceSimpleScope.<BidiGlobalDir>getUnscopedProvider()).in(ApiCallScope.class);
}
Aggregations