Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var sidenavDirective = angular.module('sidenavDirective', [])
  2. .directive('resize', function($window) {
  3.  
  4. return function(scope, elem) {
  5. function applyHeight() {
  6. winHeight = $window.innerHeight;
  7. elem.css('height', winHeight + 'px');
  8. }
  9. angular.element($window).bind('resize', function() {
  10. scope.$apply(function() {
  11. applyHeight();
  12. });
  13. });
  14. applyHeight();
  15. };
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement