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

Added 'on' method #4

Closed yizhao closed 9 years ago

yizhao commented 9 years ago

‘on’ method updates the match media by passing in a callback function.

yizhao commented 9 years ago

I also have a question. In the current readme, there is a section of code:

Note: It's important if you plan on using screensize.is() in directives to assign its return value to a scoped variable. If you don't, it will only be evaluated once and will not update if the window is resized or if a mobile device is turned sideways.

What does this mean?

jacopotarantino commented 9 years ago

Thanks for adding this! If you could fix that one issue, I'd be happy to merge it in. In answer to your question, it's been a long time since I've worked on this haha. but issues of resizing screens are rendered moot when using your on method so I wouldn't worry about it too much.

yizhao commented 9 years ago

Take a look again. I changed that line from 'javascript' back to 'html'

yizhao commented 9 years ago

Does everything look good w/ the pull request?

jacopotarantino commented 9 years ago

Sorry so slow. Looks good to me.

yizhao commented 9 years ago

awesome : )