fix(view): fixed hydrator to export the dom element instead of ng element

This commit is contained in:
vsavkin 2015-04-17 12:08:11 -07:00
parent abfe175c9e
commit eac5c88893
2 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ export class AppViewHydrator {
if (elementInjector.isExportingComponent()) { if (elementInjector.isExportingComponent()) {
view.locals.set(exportImplicitName, elementInjector.getComponent()); view.locals.set(exportImplicitName, elementInjector.getComponent());
} else if (elementInjector.isExportingElement()) { } else if (elementInjector.isExportingElement()) {
view.locals.set(exportImplicitName, elementInjector.getNgElement()); view.locals.set(exportImplicitName, elementInjector.getNgElement().domElement);
} }
} }

View File

@ -367,7 +367,7 @@ export function main() {
var value = view.rawView.locals.get('alice'); var value = view.rawView.locals.get('alice');
expect(value).not.toBe(null); expect(value).not.toBe(null);
expect(value.domElement.tagName.toLowerCase()).toEqual('div'); expect(value.tagName.toLowerCase()).toEqual('div');
async.done(); async.done();
}) })
@ -383,7 +383,7 @@ export function main() {
var value = view.rawView.locals.get('superAlice'); var value = view.rawView.locals.get('superAlice');
expect(value).not.toBe(null); expect(value).not.toBe(null);
expect(value.domElement.tagName.toLowerCase()).toEqual('div'); expect(value.tagName.toLowerCase()).toEqual('div');
async.done(); async.done();
}) })