Ian McNally

Modernizr in Angular templates

May 22, 2014

Want to use Modernizr in your templates? It’s pretty handy:

<div ng-show="Modernizr.someFeature"></div>

Attach Modernizr to $rootScope:

$rootScope.Modernizr = Modernizr

And you’re good to go.


Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.