Fixed infinite scroll

This commit is contained in:
Fergal Moran
2015-12-29 21:17:54 +00:00
parent f92cc2bd07
commit 75e6f65fee
2 changed files with 3 additions and 24 deletions

View File

@@ -54,7 +54,7 @@ angular.module('dssWebApp', [
'https://dsscdn.blob.core.windows.net/mixes/**'
]);
$locationProvider.html5Mode(true);
}).run(function ($http, $rootScope, $state, $anchorScroll, $window, LoginService, Session, SocketService) {
}).run(function ($http, $rootScope, $state, $window, LoginService, Session, SocketService) {
$rootScope.isPlaying = false;
$rootScope.setCurrentUser = function (user) {
@@ -115,24 +115,4 @@ angular.module('dssWebApp', [
event.preventDefault();
}
});
$rootScope.$on('$viewContentLoaded', function (evt, absNewUrl, absOldUrl) {
$anchorScroll();
//$window.scrollTop(0, 0);
});
$rootScope.$on('$locationChangeSuccess', function (evt, absNewUrl, absOldUrl) {
$anchorScroll();
});
/*
$rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) {
console.log('$stateChangeError - fired when an error occurs during transition.');
console.log(arguments);
});
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
console.log('$stateChangeSuccess to ' + toState.name + '- fired once the state transition is complete.');
});
$rootScope.$on('$stateNotFound', function (event, unfoundState, fromState, fromParams) {
console.log('$stateNotFound ' + unfoundState.to + ' - fired when a state cannot be found by its name.');
console.log(unfoundState, fromState, fromParams);
});
*/
});

View File

@@ -7,13 +7,12 @@ angular.module('dssWebApp')
$scope.page = 1;
$scope.nextPage = function (e) {
$scope.page++;
/*
MixModel.findAll({
page: $scope.page,
waveform_generated: "True",
is_featured: "True",
limit: 3
});*/
});
};
//MixModel.bindAll(null, $scope, 'mixes');
MixModel.bindAll(null, $scope, 'mixes');
});