ComponentLoader class

Supports imperatively loading and binding new components at runtime.

AngularDart is most optimized when the entire application DOM and component tree is known ahead of time, but sometimes an application will want to load a new component at runtime.

This class is replacing SlowComponentLoader, which has almost the same API and properties, but uses runtime introspection in order to lookup and then create the component. Going forward, ComponentLoader is preferred.

Implementers

Constructors

ComponentLoader()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadDetached<T extends Object>(ComponentFactory<T> component, {Injector? injector}) ComponentRef<T>
Creates and loads a new instance of the component defined by component.
loadNextTo<T extends Object>(ComponentFactory<T> component, {Injector? injector}) ComponentRef<T>
Creates and loads a new instance of the component defined by component.
loadNextToLocation<T extends Object>(ComponentFactory<T> component, ViewContainerRef location, {Injector? injector}) ComponentRef<T>
Creates and loads a new instance of the component defined by component.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited