--- name: interchange url: /interchange ---
Interchange allows you to specify what specific content to view based on a media query. The last query to match will be shown.
Because of some cool Angular features, you're welcome to either specify the content right away (without including src
) or, you can specify a partial to be loaded. Loading is done lazily, meaning that even with 20 different zf-source
declarations, only the correct one will load for the current media query. So if you're on mobile, only the mobile partial will load up.
Note that partials do not get RE-LOADED, meaning that as long as the user is on the page, the various partials will be cached.
You can use Interchange with this simple markup:
You can use Interchange to display HTML partials depending on screen size like so: