jacopotarantino / angular-match-media

Angular module to use Bootstrap3 media queries in your angular controllers.
https://jack.ofspades.com/angular-matchmedia-module/
Other
135 stars 37 forks source link

.is() question #2

Closed yizhao closed 9 years ago

yizhao commented 9 years ago

$scope.mobile = screenSize.is('xs'); $scope.desktop = screenSize.is('xm, md, lg');

These two variables are not changing if I'm resizing the browser screen on the fly.

jacopotarantino commented 9 years ago

As of yet, the plugin doesn't change values once they're set. Would you like to create a PR to fix that? It could probably be wired up pretty quickly with $scope.$watch..

yizhao commented 9 years ago

Thanks for the response. I'll do it when I have some free cycles.

yizhao commented 9 years ago

I put a PR in adding this feature. I didn't use $watch. Instead, I'm using events. Take a look. Thanks.

jacopotarantino commented 9 years ago

Thanks!