From eac5c88893a5784384b6c7667945d7c21b94a48a Mon Sep 17 00:00:00 2001 From: vsavkin Date: Fri, 17 Apr 2015 12:08:11 -0700 Subject: [PATCH] fix(view): fixed hydrator to export the dom element instead of ng element --- modules/angular2/src/core/compiler/view_hydrator.js | 2 +- modules/angular2/test/core/compiler/integration_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/angular2/src/core/compiler/view_hydrator.js b/modules/angular2/src/core/compiler/view_hydrator.js index 326ea0313e..f034ec155e 100644 --- a/modules/angular2/src/core/compiler/view_hydrator.js +++ b/modules/angular2/src/core/compiler/view_hydrator.js @@ -175,7 +175,7 @@ export class AppViewHydrator { if (elementInjector.isExportingComponent()) { view.locals.set(exportImplicitName, elementInjector.getComponent()); } else if (elementInjector.isExportingElement()) { - view.locals.set(exportImplicitName, elementInjector.getNgElement()); + view.locals.set(exportImplicitName, elementInjector.getNgElement().domElement); } } diff --git a/modules/angular2/test/core/compiler/integration_spec.js b/modules/angular2/test/core/compiler/integration_spec.js index eb821389c8..1e8e177083 100644 --- a/modules/angular2/test/core/compiler/integration_spec.js +++ b/modules/angular2/test/core/compiler/integration_spec.js @@ -367,7 +367,7 @@ export function main() { var value = view.rawView.locals.get('alice'); expect(value).not.toBe(null); - expect(value.domElement.tagName.toLowerCase()).toEqual('div'); + expect(value.tagName.toLowerCase()).toEqual('div'); async.done(); }) @@ -383,7 +383,7 @@ export function main() { var value = view.rawView.locals.get('superAlice'); expect(value).not.toBe(null); - expect(value.domElement.tagName.toLowerCase()).toEqual('div'); + expect(value.tagName.toLowerCase()).toEqual('div'); async.done(); })