Created
May 27, 2016 12:33
-
-
Save phillipsj/f27f6ee75de18b9a31af90fe4a700057 to your computer and use it in GitHub Desktop.
EmberHelpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export function mailtoLink(input) { | |
var mailTo = '<a href="mailto:' + input + '">'; | |
mailTo += input + '</a>'; | |
return new Ember.Handlebars.SafeString(mailTo); | |
} | |
export default Ember.Handlebars.makeBoundHelper(mailtoLink); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export function telLink(input) { | |
var tel = '<a href="tel:' + input + '">'; | |
tel += input + '</a>'; | |
return new Ember.Handlebars.SafeString(tel); | |
} | |
export default Ember.Handlebars.makeBoundHelper(telLink); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Email: {{mailto-link email}}</p> | |
<p>Phone: {{tel-link phone}}</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment