First enhancement in the send flow architecture

This commit is contained in:
Jean-Baptiste Dominguez 2018-08-29 15:38:23 +09:00
commit d864b35513
4 changed files with 197 additions and 21 deletions

View file

@ -0,0 +1,52 @@
'use strict';
(function(){
angular
.module('copayApp.services')
.factory('sendFlowRouterService', sendFlowRouterService);
function sendFlowRouterService($state, $ionicHistory) {
var router = {
// A separate state variable so we can ensure it is cleared of everything,
// even other properties added that this service does not know about. (such as "coin")
// Functions
start: start,
goNext: goNext,
goBack: goBack,
};
return router;
/**
*
*/
function start() {
$ionicHistory.clearHistory();
$state.go('tabs.send');
}
/**
*
*/
function goNext(state) {
/**
* Strategy
* Clean the history & and go to the send tab.
*/
// need to complete here
}
function goBack() {
/**
* Strategy
*/
$ionicHistory.goBack();
}
};
})();