Responsive template swapping with Angular Directives

I've posted a few days ago on responsive template swapping with Backbone, here's an example showing how to do that in Angular using a custom Directive.

See the Pen hfAxn by Chang Wang (@cheapsteak) on CodePen

Continue Reading

Responsive template swapping with Backbone

CSS media queries sometimes aren't quite enough to get a design "just right" for every screen-size, especially for web-apps where you might want to change the UI more drastically than more content-centric blogs or product-pages.

For Backbone applications, here's an example using window.matchMedia to swap which template to render depending on whether a given media query matches.

See the Pen Responsive template swapping with Backbone by Chang Wang (@cheapsteak) on CodePen

Continue Reading