remove angular-resource
improve offline localstorage mechanism