Advertisement
Guest User

Untitled

a guest
Mar 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. 1 508285 error Error: w.height is not a function. (In 'w.height()', 'w.height' is undefined)
  2. getWindowDimensions@http://192.168.0.108:8100/js/app.js:284:73
  3. $digest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30230:37
  4. $apply@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30503:31
  5. done@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:24824:53
  6. completeRequest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:25022:15
  7. requestLoaded@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:24963:24
  8.  
  9. 2 508289 error Error: w.height is not a function. (In 'w.height()', 'w.height' is undefined)
  10. getWindowDimensions@http://192.168.0.108:8100/js/app.js:284:73
  11. $digest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30230:37
  12. $apply@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30503:31
  13. done@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:24824:53
  14. completeRequest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:25022:15
  15. requestLoaded@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:24963:24
  16.  
  17. 3 508309 error Error: w.height is not a function. (In 'w.height()', 'w.height' is undefined)
  18. getWindowDimensions@http://192.168.0.108:8100/js/app.js:284:73
  19. $digest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30230:37
  20. http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:30434:33
  21. completeOutstandingRequest@http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:19194:15
  22. http://192.168.0.108:8100/lib/ionic/js/ionic.bundle.js:19470:33
  23.  
  24. <div id="pageContent" ng-style="height(75)" resize></div>
  25.  
  26. .directive('resize', function ($window) {
  27. return function (scope, element) {
  28. var w = angular.element($window);
  29. scope.getWindowDimensions = function () { return { 'h': w.height(), 'w': w.width() }; };
  30. scope.$watch(scope.getWindowDimensions, function (newValue, oldValue) {
  31. scope.windowHeight = newValue.h;
  32. scope.windowWidth = newValue.w;
  33. scope.style = function (amount) { return { 'height': (newValue.h - amount) + 'px', 'width': (newValue.w - amount) + 'px' }; };
  34. scope.height = function (amount) { return { 'height': (newValue.h - amount) + 'px' }; };
  35. }, true);
  36. w.bind('resize', function () { scope.$apply(); });
  37. }
  38. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement