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.

Cannot use protocols inside anchors with v-bind

See original GitHub issue

Vue.js version

2.1.6

Reproduction Link

http://jsfiddle.net/df4Lnuw6/83/

Steps to reproduce

  <a :href="mailto:email">Send us an email</a>
  <a :href="tel:telephone">Call us</a>

What is Expected?

Anchors should work when using v-bind with protocols (mailto, tel, etc.), so when used in websites on mobile phones should raise the proper applications to handle those events.

What is actually happening?

Getting a compilation error on the template.

<div id="app">
  {{ foo }}
  <br>
  <a :href="mailto:email">Send us an email</a>
  <br>
  <a :href="tel:telephone">Call us</a>
</div>

- invalid expression: :href="mailto:email"
- invalid expression: :href="tel:telephone"

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
fnlctrlcommented, Dec 16, 2016
2reactions
jiminikizcommented, Nov 28, 2017

If using vue-cli / webpack, this is a nice solution using template literals:

<a :href="`mailto:${ email }`">{{ email }}</a>
Read more comments on GitHub >

github_iconTop Results From Across the Web

bASSET [bLUNA] - Anchor Protocol
1. Navigate to the LUNA/bLUNA page in the bASSET page. · 2. Navigate to the MINT tab. · 3. Enter the amount of...
Read more >
Can't use protocols with SwiftUI models? - Apple Developer
I've been using protocols to help model a hierarchy of different object types. As I try to convert my app to use SwiftUI,...
Read more >
Tutorial of the Month — Anchor Protocol | by Xavier Meegan
A yield farming tutorial in Anchor, a savings protocol on Terra blockchain, using liquid staking derivatives minted by Lido DAO.
Read more >
8. Configuration Reference — BIND 9 9.18.8 documentation
Defines DNSSEC trust anchors: if used with the initial-key or initial-ds keyword, trust anchors are kept up-to-date using RFC 5011 trust anchor maintenance;...
Read more >
GROUND ANCHORS AND ANCHORED SYSTEMS
who drafted the figures and assisted in the layout of the document. ... bars cannot be accepted even though the grout tendon bond...
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