Replaced DOMqueriesWithoutResults by queriesWithoutResults to include jQuery queries

This commit is contained in:
Gaël Métais
2015-05-22 18:54:32 +02:00
parent 2fb4a7bd6a
commit 33621af3ad
5 changed files with 52 additions and 41 deletions
+11
View File
@@ -22,6 +22,17 @@ yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
$rootScope.isTouchDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);
$rootScope.loadedRunId = null;
var oldHash;
// We don't want the hash to be kept between two pages
$rootScope.$on('$locationChangeStart', function(param1, param2, param3, param4){
var newHash = $location.hash();
if (newHash === oldHash) {
$location.hash(null);
}
oldHash = newHash;
});
// Google Analytics
$rootScope.$on('$routeChangeSuccess', function(){
ga('send', 'pageview', {'page': $location.path()});