refactor scroll method

This commit is contained in:
Javier 2016-01-29 15:56:36 -03:00
commit 4ed0c7b85c
2 changed files with 9 additions and 6 deletions

View file

@ -164,7 +164,7 @@ angular.module('copayApp.controllers').controller('createController',
if (err) {
$log.warn(err);
self.error = err;
scrollUp();
scrollUp('notification');
$timeout(function() {
$rootScope.$apply();
});
@ -175,8 +175,9 @@ angular.module('copayApp.controllers').controller('createController',
}, 100);
}
function scrollUp(){
$location.hash('notification');
function scrollUp(location){
if(!location) return;
$location.hash(location);
$anchorScroll();
};