-
Notifications
You must be signed in to change notification settings - Fork 6.8k
md-menu does not appear next to attached element and menu anchor links do not route #1387
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
Comments
Is this a bug? |
This is a bug somewhere - either in the code or in the documentation. My Plunkers are very complicated and time consuming. They never work from On Fri, Sep 30, 2016 at 1:16 PM, Bruno da Silva joão <
Mike Laird 12 Arbor Creek Drive, Pittsford, New York 14534 ". . . remembering on both sides that civility is not a sign of weakness, |
Here is one I created that I think demonstrates the problem |
Yes, that's it. When you click on rbostock's gray circle in the top right Thank you, rbostock. On Fri, Sep 30, 2016 at 7:24 PM, rbostock [email protected] wrote:
Mike Laird 12 Arbor Creek Drive, Pittsford, New York 14534 ". . . remembering on both sides that civility is not a sign of weakness, |
OK, I figured out my positioning problem. The style class "md-overlay-container" was undefined because the styling wasn't specified, resulting in the correct css file not being included. I've updated the plunkr to include a pre-built theme as per the theming doc (see line 8 of index.html). I guess this wasn't necessary in the previous release. @mLaird: I can't comment on the routing problem, because this example just uses the button (click) method. |
In your plunker from 3 days ago, I am still seeing the menu at the bottom of the card, and not attached to the Application Name element in the toolbar. Also, if the behavior can somehow be fixed with something like your line 8 in index.html, (<script src="https://unpkg.com/zone.js/dist/zone.js"></script>, then the bug is in the documentation. It has no mention of unpkg.com. Lastly, alpha.9 is released. I have not tried it yet, but the changelog makes no mention of fixes to md-menu. As far as I can tell, this is still a bug for md-menu. |
Sorry, forgot to freeze the plunk. I think you might not have been able to see the line in the index.html.In my project, I instead put |
@rbostock I think that using angular-cli you should place it in angular-cli.json apps.styles list. If you put that in your index.html it wold not be bundled and you will ending up having to load the bundle and the theme file instead of loading only the bundle.. I can be wrong, but I've read it in some place. |
Sounds like this was caused by missing core styles, now documented in https://github.com/angular/material2/blob/master/docs/theming.md |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
My app uses Angular 2.0.1 and Angular Material 2.0.0-alpha.8-2. Per md-menu docs, I have attached a menu dropdown to a button in the md-toolbar header. This header, a router-outlet link and a footer are the 3 elements in the AppComponent. Problem #1: When the button is clicked, the test menu appears, but it is below the footer, instead of being a dropdown from the button. I have tried x and y position with no results. The dropdown contains anchor links to route to pages. Problem #2: When the anchor links are clicked, the dropdown disappears, but no routing to a new page occurs. These anchor links are also in the toolbar for test purposes, and the links and the router work correctly in the toolbar - outside the menu. Here is relevant code.
<button md-button [md-menu-trigger-for]="menu">POST
<md-menu x-position="after" #menu="mdMenu">
Home
Rent an apartment
RefreshTest
Home
Rent apartment
others, etc.
TERMS
PRIVACY
others, etc.
The text was updated successfully, but these errors were encountered: