I\'m building a relatively complex and data heavy web application in AngularJS. I\'m planning to use php as a RESTful backend (with symfony2 and FOSRESTbundle). I have spent wee
To work offline with your requeriments I suggest to divide problem into two scenarios: content (html, js, css) and data (API REST).
Will be stored offline by appcache for small apps or for advanced cases with the awesome serviceworkers. Chrome 40+.
Require solve the storage and synchronization and It becames a more difficult problem. I suggest a deep reading of the Differential Synchronization algorimth, and take next tips in consideration:
FrontendStore the resource and shadow (using for example url as key) into the localstorage for small apps or into more advanced alternatives (pouchdb,indexdb,...). With the resource you could work offline and when needs synchronize with the server use jsonpath to get diffs between the resource-shadow and to send it to server the PATCH request.
BackendAt backend take in consideration storage the shadow copies into redis.
The two sides (Frontend/Backend) needs to identify the client node, to do so you could use x- syn-token
at HTTP header (send it in all request of the client with angular interceptors).