Preloading Routes using Modifiers

Preloading Routes using Modifiers

Use this lesser–known API to prefetch a link's data as soon as it’s hovered

Subscribe to watch


Before modifiers came to Ember, we only had components, services, and mixins (now defunct) as tools for sharing and composing behavior. These primitives work well, but there’s always been a certain class of situation where none of them quite line up with the composition problem at hand.

Modifiers address this. They’ve given us a powerful new way to compose behavior in Ember.

In this series, we’ll learn how to build a Preload modifier that leans on the conventions of Ember’s router to preload links throughout our application. The result will be a powerful modifier that speeds up our app every time we use it.