Skip to content
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

v4: ion-button with href not styled as anchor #14777

Closed
matthew-valenti opened this issue Jul 15, 2018 · 2 comments
Closed

v4: ion-button with href not styled as anchor #14777

matthew-valenti opened this issue Jul 15, 2018 · 2 comments
Assignees
Labels

Comments

@matthew-valenti
Copy link

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI)          : 4.0.0-rc.11 (C:\Users\matth\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-alpha.9
   @angular-devkit/core       : 0.7.0-rc.1
   @angular-devkit/schematics : 0.7.0-rc.1
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0-rc.10
   @ionic/schematics-angular  : 1.0.0-rc.10

System:

   NodeJS : v8.9.4 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

Describe the Bug
Breaking changes documentation says "Ionic will determine when to render an anchor tag based on the presence of an href attribute."
https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md

However, an ion-button with an href or routerLink attribute looks the same as a button and is not styled like an anchor tag.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Add ion-button with href or routerLink attribute.
  2. Displays as button and not an anchor

Related Code

<ion-button href="/about">About</ion-button>
<ion-button routerLink="/about" routerDirection="forward">About</ion-button>

Expected Behavior
Expecting element to look like an anchor e.g.underlined text.

@ionitron-bot ionitron-bot bot added the triage label Jul 15, 2018
@brandyscarney brandyscarney self-assigned this Jul 16, 2018
@brandyscarney
Copy link
Member

brandyscarney commented Jul 16, 2018

Thanks for the issue! So the ion-button component is working as intended. This element should always look like a button element, even if it is rendering an a tag underneath.

We have another element called an ion-anchor that should work the same with the router, but I just noticed it is not getting the correct styles. I'll be pushing a fix for this shortly and then we'll have that in the next release. 🙂

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants