Dart Documentationangular.core.domBoundBlockFactory

BoundBlockFactory class

BoundBlockFactory is a BlockFactory which does not need Injector because it is pre-bound to an injector from the parent. This means that this BoundBlockFactory can only be used from within a specific Directive such as NgRepeat, but it can not be stored in a cache.

The BoundBlockFactory needs Scope to be created.

class BoundBlockFactory {
 BlockFactory blockFactory;

 Injector injector;

 BoundBlockFactory(BlockFactory this.blockFactory, Injector this.injector);

 Block call(Scope scope) {
   return blockFactory(injector.createChild([new Module()..value(Scope, scope)]));
 }
}

Constructors

new BoundBlockFactory(BlockFactory blockFactory, Injector injector) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
BoundBlockFactory(BlockFactory this.blockFactory, Injector this.injector);

Properties

BlockFactory blockFactory #

BlockFactory blockFactory

Injector injector #

Injector injector

Methods

Block call(Scope scope) #

Block call(Scope scope) {
 return blockFactory(injector.createChild([new Module()..value(Scope, scope)]));
}