Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sidenavDirective = angular.module('sidenavDirective', [])
- .directive('resize', function($window) {
- return function(scope, elem) {
- function applyHeight() {
- winHeight = $window.innerHeight;
- elem.css('height', winHeight + 'px');
- }
- angular.element($window).bind('resize', function() {
- scope.$apply(function() {
- applyHeight();
- });
- });
- applyHeight();
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement