NullVoxPopuli / website

my empress-blog powered by ember
0 stars 3 forks source link

Blog Idea: Write your own LinkTo Component #15

Open NullVoxPopuli opened 4 years ago

NullVoxPopuli commented 4 years ago

https://ember-twiddle.com/c268d280e51a5dd64e780f860faa1330?openFiles=components.link%5C.js%2Ccomponents.info%5C.hbs

NullVoxPopuli commented 4 years ago

https://codesandbox.io/s/custom-link-component-dgbxl?file=/package.json

ember-twiddle

NullVoxPopuli commented 4 years ago

Notes on upcoming changes to linkto:

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.

NullVoxPopuli commented 3 years ago

ref: https://github.com/emberjs/ember.js/pull/19271