angularjs ngmocke2e restful interface with local storage