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!
text 0.43 KB | None | 0 0
  1. var sidenavDirective = angular.module('sidenavDirective', [])
  2. .directive('resize', function ($window) {
  3. return{
  4. scope:true,
  5. priority: 0,
  6. link: function (scope, elem, attrs) {
  7. var winHeight = $window.innerHeight;
  8. scope.$watch(function(){
  9. return $window.innerHeight;
  10. },
  11. function(newValue, oldValue) {
  12. elem.css('height', winHeight + 'px');
  13. });
  14. }}
  15. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement