Home Manual Reference Source Repository
import {RenderableInjector} from 'ug-layout/dom/RenderableInjector'
public class | source

RenderableInjector

Extends:

Injector → RenderableInjector

An injector created for renderables.

Static Method Summary

Static Public Methods
public static

fromRenderable(renderable: Type<Renderable> | ConfiguredRenderable<Renderable> | Renderable, providers: Provider[], parent: Injector, options: {skipInit: ?boolean}): RenderableInjector

Creates an injector from a ConfiguredRenderable, a Renderable constructor or a Renderable instance.

Inherited Summary

From class Injector
public static

fromInjectable(injectable: Type<any>, providers: ProviderArg[], parent: Injector): Injector

Creates a new injector from an annotated injectable Class.

public static

resolveInjectables(injectable: *): *[]

public get

The parent injector if it is set.

public

get(token: *, defaultValue: *, metadata: InjectionMetadata): *

Gets a dependecy from the provided token.

public

getDependencies(metadata: *): *

public

instantiate(Ref: *, d: ...*): *

public

invoke(fn: *, providers: *): *

public

Registers a provider with the injector.

public

Creates a new injector with the given providers and sets this injector as it's parent.

public

resolveAndInstantiate(provider: *): T

Resolves the given provider with this injector.

public

setParent(parent: Injector)

Programmatically set the parent injector.

Static Public Methods

public static fromRenderable(renderable: Type<Renderable> | ConfiguredRenderable<Renderable> | Renderable, providers: Provider[], parent: Injector, options: {skipInit: ?boolean}): RenderableInjector source

Creates an injector from a ConfiguredRenderable, a Renderable constructor or a Renderable instance. The renderable is registered under the ConfiguredRenderable token and the configuration is under the ConfigurationRef token.

Params:

NameTypeAttributeDescription
renderable Type<Renderable> | ConfiguredRenderable<Renderable> | Renderable
providers Provider[]
  • optional
  • default: []
parent Injector
  • optional
options {skipInit: ?boolean}
  • optional
  • default: {}