First enhancement in the send flow architecture
This commit is contained in:
parent
b35ee316a8
commit
d864b35513
4 changed files with 197 additions and 21 deletions
52
src/js/services/send-flow-router.service.js
Normal file
52
src/js/services/send-flow-router.service.js
Normal 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();
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue