daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.directive('scroll', function($location){
  2.     return{
  3.         restrict: 'A',
  4.         link: function(scope, element, attrs){
  5.             element.on('scroll', function(){
  6.                 let fh = $('#ngview').height();
  7.                 let nh = Math.round($(element).height()  + $(element).scrollTop());
  8.                 if(fh == nh){
  9.                     //Here we do what we need
  10.                 }
  11.             })
  12.         }
  13.     }
  14. });
  15.    
  16. <div class="col-md-12 middle-body" scroll>
  17.             <div ng-show="showUserModal" ng-include="'partial/loginModal.html'"></div>
  18.             <div class="user-loader" ng-show="loading">
  19.                 <div class="spinner"></div>
  20.             </div>
  21.             <div ng-view id="ngview">
  22.  
  23.             </div>
  24.         </div>
  25.    
  26. var app = angular.module('app',
  27. [
  28.     'ngRoute',
  29.     'lastUpdateModule',
  30.     'selectedByGenreModule',
  31.     'currentFilmModule',
  32.     'httpFactory',
  33.     'userModule',
  34.     'accountModule'
  35. ]);
  36.    
  37. const SelectedByGenreModule = require('../controllers/selectedByGenre.controller.js')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top