angular-rest-offline

An angularJS module for restFull webapp offline with localStorage. Need manifest.appcache for use

Angular Core Dependency: 1.3.*

Module License: MIT

Added by: Sam Deering

GitHub

Repository

jack-in-the-box/angular-rest-offline

Stats

Stars: 7

Watchers: 7

Forks: 1

Module Description

angular-rest-offline

An angularJS module for restFull webapp offline with localStorage. Need manifest.appcache for use

Codeship Status for jack-in-the-box/angular-rest-offline

Compatiblity

This module work only with last version of firefox and Chrome. TODO IE11

Big Picture

Sometimes drawing is more efficient than a lot of words

GET ressources

![Case study for GET ressources] (https://raw.githubusercontent.com/jack-in-the-box/angular-rest-offline/master/doc/getressources.png)

GET ressources/id

Case study for GET ressource with id from ressources

POST a new ressource

Case study for POST a new ressource

Sample

Normal ressources

OfflineServiceProvider.setApiUrl("/api/");
OfflineServiceProvider.setApis([
    {
        ressource: "ressources",
    }
]);

Ressources with recursivity

OfflineServiceProvider.setApiUrl("/api/");
OfflineServiceProvider.setApis([
    {
        ressource: "recursiveRessources",
        finder: function(collection, key) {
            var self = this;
            return _.find(collection, function(item) {
                return (item.id === key) || self.finder(item.children || [], key)
            });
        }
    }
]);

Module stats last updated: 2015-06-04 11:09:20

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!