Refactor incomingData
This commit is contained in:
parent
2b8c2d1c61
commit
ddd867092c
6 changed files with 90 additions and 55 deletions
|
|
@ -29,13 +29,17 @@ angular
|
|||
map: map,
|
||||
pop: pop,
|
||||
push: push,
|
||||
isEmpty: isEmpty
|
||||
};
|
||||
|
||||
return service;
|
||||
|
||||
function init(params) {
|
||||
clear();
|
||||
push(params);
|
||||
|
||||
if (params) {
|
||||
push(params);
|
||||
}
|
||||
}
|
||||
|
||||
function clear() {
|
||||
|
|
@ -94,6 +98,10 @@ angular
|
|||
clearCurrent();
|
||||
map(params);
|
||||
};
|
||||
|
||||
function isEmpty() {
|
||||
return service.previousStates.length == 0;
|
||||
};
|
||||
};
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue