question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

a[md-button] doesn't work without button[md-button]

See original GitHub issue

The following code doesn’t properly render buttons.

<md-toolbar color="primary">
    <span>App</span>
    <a md-button color="primary" [routerLink]="['/summary']">Summary</a>
    <a md-button color="primary" [routerLink]="['/log']">View Log</a>
    <a md-button color="primary" [routerLink]="['/metric']">View Metric</a>
    <a md-button color="primary" [routerLink]="['/config']">View Config</a>
</md-toolbar>

screen shot 2016-05-06 at 4 39 46 pm

If I add a button it fixes the a[md-buttons]:

<md-toolbar color="primary">
    <span>App</span>
    <a md-button color="primary" [routerLink]="['/summary']">Summary</a>
    <a md-button color="primary" [routerLink]="['/log']">View Log</a>
    <a md-button color="primary" [routerLink]="['/metric']">View Metric</a>
    <a md-button color="primary" [routerLink]="['/config']">View Config</a>
    <button md-button>FOO</button>
</md-toolbar>

screen shot 2016-05-06 at 4 40 06 pm

Using:

  • angular: 2.0.0-rc.0
  • material: 2.0.0-alpha.4

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
szechyjscommented, May 6, 2016

Importing MdAnchor as a directive solved my problem.

<md-toolbar color="primary">
    <span>App</span>
    <a md-button [routerLink]="['/summary']">Summary</a>
    <a md-button [routerLink]="['/log']">View Log</a>
    <a md-button [routerLink]="['/metric']">View Metric</a>
    <a md-button [routerLink]="['/config']">View Config</a>
</md-toolbar>

I also had to remove color="primary" else the text color was the same as the background color. Is this correct?

We should probably add something to the docs about MdAnchor.

Thanks for the help!

0reactions
angular-automatic-lock-bot[bot]commented, Sep 4, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Radeon Update button is missing : r/radeon - Reddit
On Properties, go straight to Driver tab and click on Rollback Driver then click Ok. After that try to re-open the AMD software...
Read more >
PC won't turn on sometimes when pressing the power button.
My only thoughts right now are that the power button is going bad or the PSU is going bad (which would be terribly...
Read more >
Solved: AMD ReLive interfering with Ctrl + Shift + [letter...
ReLive doesn't use this exact shortcut but it seems to capture and block the ... Performance Logging Hotkey button, it will then ask...
Read more >
Solved: ReLive not working at all - AMD Community
When I click any of the buttons to record/instant replay/gif/screenshot and none of them work. The red overlay thing doesn't appear on my...
Read more >
Solved: Windows Start Menu not working after driver update
It's not an AMD driver issue. For me what works is to turn off 'Use my sign-in info to automatically finish setting up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found