From c6adbf602c32d19e928107a66fa5b29c14b4321b Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 28 Jan 2016 15:33:50 -0800 Subject: [PATCH] =?UTF-8?q?fix(query):=20don=E2=80=99t=20cross=20component?= =?UTF-8?q?=20boundaries=20Closes=20#6759?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/angular2/src/core/linker/element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/core/linker/element.ts b/modules/angular2/src/core/linker/element.ts index b61ea3a231..42b716e999 100644 --- a/modules/angular2/src/core/linker/element.ts +++ b/modules/angular2/src/core/linker/element.ts @@ -463,7 +463,7 @@ export class AppElement implements DependencyProvider, ElementRef, AfterViewChec var inj: AppElement = this; while (isPresent(inj)) { inj._setQueriesAsDirty(); - if (isBlank(inj.parent) && isPresent(inj.parentView.containerAppElement)) { + if (isBlank(inj.parent) && inj.parentView.proto.type === ViewType.EMBEDDED) { inj = inj.parentView.containerAppElement; } else { inj = inj.parent;