ComponentFactory<T> class

Backing implementation behind a class T annotated with @Component.

For example, if this lives in example.dart:

@Component(
  selector: 'example',
  template: '...',
)
class Example {}

... then ExampleNgFactory is generated in example.template.dart, and can be accessed by importing this generated file. For example:

import 'example.template.dart' as ng;

getComponentFactory() {
  final ComponentFactory<ng.Example> comp = ng.ExampleNgFactory;
  // Can now use 'comp' as a ComponentFactory<Example>.
}

It is not valid to implement, extend, mix-in, or construct this type.

Constructors

ComponentFactory(String selector, AppView<T> _viewFactory(AppView<void> parentView, int parentIndex))
Internal constructor for generated code only - do not invoke.
const

Properties

componentType → Type
@Deprecated('Used for the deprecated router only.'), read-only
selector → String
final
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

create(Injector injector, [ List<List> projectableNodes ]) ComponentRef<T>
Creates a new component.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited