angular.run(function($rootScope){
$rootScope.$on('$routeChangeStart', function(e){
checkAuth().then(function (response) {
// ... всё ок
}, function(response){
// ... всё плохо.
$location.path('/login');
});
});
});
imgPath String - Optional override for spritesheet path specified in CSS
For example if ../sprite.png is given, then the CSS will have:
background-image: url(../sprite.png);
(function(){
var t;
$('input').on('keyup', function(){
if (t) clearTimeout(t);
t = setTimeout(callback, 3000);
});
})();