ghengeveld / angular-adaptive-templating

Adaptive templates for AngularJS
66 stars 10 forks source link

Example to add test in angular.config fails due to missing variable $window #3

Open Mark-Schmeiser opened 9 years ago

Mark-Schmeiser commented 9 years ago

Hi,

your example says: Tests can be configured in your module's config block: myApp.config(function (adaptiveTemplatingProvider) { var isMobile = $window.matchMedia('(max-width: 767px)').matches; adaptiveTemplatingProvider.addTest('mobile', isMobile); })

The variable $window cannot be used in config(), only in run(). Perhaps you'd like to fix that in your readme.md.