1.)
My approach is to create a proxy service which uses either the $http service or a custom LocalStorage service depending on the navigator.onLine property.
I created a very basic fiddle to demonstrate my approach: http://jsfiddle.net/rommsen/DqKtx/9/
Is there any better or "more angular" way of doing this? I was thinking of implementing the LocalStorage service similar to the $http service but to be honest I can not really get a grip of the $q and defer api.
Aus meinem Google Groups Post
1.) My approach is to create a proxy service which uses either the $http service or a custom LocalStorage service depending on the navigator.onLine property. I created a very basic fiddle to demonstrate my approach: http://jsfiddle.net/rommsen/DqKtx/9/ Is there any better or "more angular" way of doing this? I was thinking of implementing the LocalStorage service similar to the $http service but to be honest I can not really get a grip of the $q and defer api.