Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix isComponentView() and isEmbeddedView() tests #14789

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Feb 28, 2017

fixes #14778

@vicb vicb added area: core Issues related to the framework runtime action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 28, 2017
@vicb vicb requested a review from tbosch February 28, 2017 01:42
@@ -141,11 +141,11 @@ export function elementEventFullName(target: string, name: string): string {
}

export function isComponentView(view: ViewData): boolean {
return view.component === view.context && !!view.parent;
return !!view.parent && ((view.parentNodeDef.flags & NodeFlags.Component) != 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better: !!view.parent && !!(view.parentNodeDef.flags & NodeFlags.Component), same below. At least use !==0 (2 =, not just 1).

@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 28, 2017
@IgorMinar IgorMinar merged commit 5753de5 into angular:master Mar 1, 2017
@vicb vicb deleted the 0227-iscmpview branch May 19, 2017 17:28
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't pass class instance as context to ngTemplateOutlet
4 participants