| | 1 | = emReset = |
| | 2 | [[TOC]] |
| | 3 | |
| | 4 | The {{{emReset}}} service provides methods to reset (="clean") the local database. |
| | 5 | |
| | 6 | == Reset == |
| | 7 | |
| | 8 | The {{{emReset.reset()}}} method removes all current user resources, including their database tables and schemas. This is an asynchronous process, so the method returns a then-able promise that can be used to restore the UI, e.g. by routing to another page. |
| | 9 | |
| | 10 | {{{#!js |
| | 11 | emReset.reset().then(function(){ |
| | 12 | $state.go('index', {}, {location: 'replace', reload: true}); |
| | 13 | }); |
| | 14 | }}} |