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(menu): nested menu error when items are rendered in a repeater #6766

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

crisbeto
Copy link
Member

Fixes an error that was being thrown when the menu items that trigger a sub-menu are rendered in a repeater.

Fixes #6765.

@crisbeto crisbeto requested a review from kara as a code owner August 31, 2017 18:09
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 31, 2017
@isaacplmann
Copy link

@kara any reason this PR hasn't been merged when #6807 was merged? This issue is blocking me from updating to beta.10 and I was sad when I realized beta.11 didn't include it. I'm looking forward to using nested menus.

Thanks for your hard work!

@@ -76,8 +78,11 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy {
/** Subscription to tab events on the menu panel */
private _tabSubscription: Subscription;

/** Stream that emits whenever the component is intialized. */
private _initialized = new Subject<void>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of creating another Subject to track initialization, how about using NgZone.onStable ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I’m not sure whether the timing is the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

I stand corrected, it does work.

@kara kara removed their assignment Sep 26, 2017
@crisbeto
Copy link
Member Author

Addressed the feedback @kara, PTAL.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Sep 26, 2017
@kara kara removed their assignment Sep 26, 2017
@isaacplmann
Copy link

@crisbeto @kara Thanks for making an awesome product! Looking forward to this being merged.

@sudhakarsp06
Copy link

sudhakarsp06 commented Sep 28, 2017

@crisbeto Thanks for making this fix. Could you please let me know of when we can expect this changes merged? Looking forward to using this nested menus.

Thanks,
Sudhakar

Fixes an error that was being thrown when the menu items that trigger a sub-menu are rendered in a repeater.

Fixes angular#6765.
@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 7, 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 cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested md-menu with md-menu-items using *ngFor throws error
6 participants