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.

proposal(mat-button): rename mat-button directive to matButton

See original GitHub issue

Bug, feature request, or proposal:

proposal

What is the expected behavior?

The mat-button directive should conform to the angular style guide and have a name in lowerCamelCase: matButton

<button matButton></button>

What is the current behavior?

The mat-button directive does not conform to the angular style guide

<button mat-button></button>

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

Conform angular material2 to the angular style guide

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

angular 4.4.6 material 2-beta.12

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fxckcommented, Oct 22, 2017

You can’t have button inside an anchor. And when it comes to “applying routerLink attribute to it”, that wouldn’t work, you can’t internally switch between anchor and button element based on just that, since routerLink listens to click event, you can in theory use it on buttons as well. And as I mentioned, you’d have to manually add all the attributes native elements might have and then pass them down to underlying elements (think disabled for example). It’s far better to simply have an attribute component.

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

rename mat-button directive to matButton · Issue #7954 - GitHub
Bug, feature request, or proposal: proposal What is the expected behavior? The mat-button directive should conform to the angular style ...
Read more >
Angular Material 2 'mat-button' shows up as regular button
When I run I get the standard browser button with no themeing. angular · typescript · angular-material2 · Share.
Read more >
Wrapping Angular Material button in custom Angular ...
In the first part of this post we ended up with a simple but repetitive solution to wrapping Angular Material button in a...
Read more >
Angular Material Buttons : Mat-Button Example - Angular Wiki
MatAnchor directive extends MatButton contains defination for raised material design button and exported as matAnchor or matButton .
Read more >
How to Create Button in Angular Material? - eduCBA
<button mat-button color="mentioned_ color">button text</button>. As you can see in the above line of syntax, we have just used the mat-button to use...
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