refactor scroll method
This commit is contained in:
parent
308919a305
commit
4ed0c7b85c
2 changed files with 9 additions and 6 deletions
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue