feat(elementBinder): introduce element binder.

It is a plain-old-data class to seperate the protoInjector from the
textNodes and elementBinding data.
This commit is contained in:
Rado Kirov
2014-10-30 14:41:19 -07:00
parent ec7e8534c2
commit 8c566dcfb5
8 changed files with 71 additions and 57 deletions

View File

@ -8,7 +8,7 @@ export function run () {
var appInjector = new Injector([]);
var bindings = [A, B, C];
var proto = new ProtoElementInjector(null, bindings, [], false);
var proto = new ProtoElementInjector(null, bindings);
for (var i = 0; i < ITERATIONS; ++i) {
var ei = proto.instantiate({view:null});
ei.instantiateDirectives(appInjector);

View File

@ -16,7 +16,7 @@ export function run () {
], false)];
var proto = new ProtoElementInjector(null, bindings, [], false);
var proto = new ProtoElementInjector(null, bindings);
for (var i = 0; i < ITERATIONS; ++i) {
var ei = proto.instantiate({view:null});
ei.instantiateDirectives(appInjector);
@ -39,4 +39,4 @@ class C {
constructor(a:A, b:B) {
count++;
}
}
}

View File

@ -8,7 +8,7 @@ export function run () {
var appInjector = new Injector([]);
var bindings = [A, B, C];
var proto = new ProtoElementInjector(null, bindings, [], false);
var proto = new ProtoElementInjector(null, bindings);
var ei = proto.instantiate({view:null});
for (var i = 0; i < ITERATIONS; ++i) {
@ -33,4 +33,4 @@ class C {
constructor(a:A, b:B) {
count++;
}
}
}