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.

md-button for anchor element is visually not same as button

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

 <a  md-button color="primary" [routerLink]="['/gotosomewhere']">Click me</a>

The button created using anchor element should be visually same as button element.

What is the current behavior?

It is not same. There is no mouse (one finger hand) icon and text is dimmed.

What are the steps to reproduce?

Just upgraded from alpha9 to alpha10.

What is the use-case or motivation for changing an existing behavior?

None

Which versions of Angular, Material, OS, browsers are affected?

Material alpha10

Is there anything else we should know?

None

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kyleledbettercommented, Nov 10, 2016

it’s bc it’s getting disabled="false" by default and to an <a> tag that’s still styled as disabled, probably from this commit https://github.com/angular/material2/commit/6b9e11cfd7700718016c444c651b9aa7e5222904#diff-96337821f283af0f38c4fd8ed4c98065R46

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 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

How to style an anchor tag to look like a button with the same ...
I added the classes and it styles it how I want it except that the height is not the same. Is there any...
Read more >
Anchors vs Buttons - bitsofcode
However, the button element is not perfect itself and there are some cases ... element so both the <a> and <button> look the...
Read more >
Bootstrap Buttons - examples & tutorial
Responsive Buttons built with Bootstrap 5. Multiple predefined button style classes: button link, outline, round button, social, floating, fixed & more.
Read more >
How do I make an anchor that looks like a button? · Issue #2028
Visually, the two are identical. So, what syntax do I use to get an anchor tag that looks like an md-button ?
Read more >
<a>: The Anchor element - HTML: HyperText Markup Language
The HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the ...
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