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

How to write your own LinkTo component #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions content/2020-10-25-how-to-make-your-own-linkto-component.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: How to Make Your Own LinkTo Component
image:
imageMeta:
attribution:
attributionLink:
featured: true
authors:
- nullvoxpopuli
date: Sun Oct 25 2020 09:55:36 GMT-0400 (Eastern Daylight Time)
tags:
- new
---

# How to make your own LinkTo component

Good luck on your new post!

Finished Code & Demo: https://codesandbox.io/s/custom-link-component-dgbxl?file=/app/components/link.hbs

Upcoming changes to `<LinkTo>` from [RFC 391](https://github.com/emberjs/rfcs/blob/master/text/0391-router-helpers.md)
> In the past, only HTMLAnchorElements that were produced by {{link-to}}s would produce a transition when a user clicked on them. This RFC changes to the global EventDispatcher to allow for any HTMLAnchorElement with a valid root relative href to cause a transition. This will allow for us to not only allows us to support use cases like the ones described in the motivation, it makes teaching easier since people who know HTML don't need know an Ember specific API to participate in routing transitions.