Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(menu): avoid runtime errors when menu-content isn't set. #10198

Merged
merged 2 commits into from
Jan 3, 2017

Conversation

devversion
Copy link
Member

No longer throws runtime exceptions in the $mdMenu service when no md-menu-content element is specified.

When the $mdMenu service is used programmatically it will show a warning and just doesn't setup the interaction.

When the md-menu directive misses the md-menu-content element a normal error will be thrown, so developers can detect before actually opening the menu, that the md-menu-content element is missing.

Fixes #9709.

No longer throws runtime exceptions in the $mdMenu service when no `md-menu-content` element is specified.

> When the `$mdMenu` service is used programmatically it will show a warning and just doesn't setup the interaction.

When the `md-menu` directive misses the `md-menu-content` element a normal error will be thrown, so developers can detect before actually opening the menu, that the `md-menu-content` element is missing.

Fixes angular#9709.
@devversion devversion added the needs: review This PR is waiting on review from the team label Jan 1, 2017
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jan 1, 2017
@devversion devversion requested a review from crisbeto January 1, 2017 21:53
@devversion devversion added in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs and removed needs: review This PR is waiting on review from the team labels Jan 1, 2017
@devversion devversion force-pushed the fix/menu-content-element branch from d888527 to 3921908 Compare January 1, 2017 22:21
@devversion devversion added needs: review This PR is waiting on review from the team and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Jan 1, 2017
@ThomasBurleson ThomasBurleson added needs: presubmit and removed needs: review This PR is waiting on review from the team labels Jan 2, 2017
@ThomasBurleson
Copy link
Contributor

lgtm

@ThomasBurleson ThomasBurleson added this to the 1.1.2 milestone Jan 2, 2017
@kara kara added pr: merge ready This PR is ready for a caretaker to review and removed needs: presubmit labels Jan 3, 2017
@kara kara merged commit 0b65e08 into angular:master Jan 3, 2017
@devversion devversion deleted the fix/menu-content-element branch January 3, 2017 19:49
davidenochk pushed a commit to davidenochk/material that referenced this pull request Feb 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants