Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.17 KB

README.md

File metadata and controls

39 lines (24 loc) · 1.17 KB

Angular Patch

Synchronizes Angular scope with the server using JSON Patch protocol (draft-ietf-appsawg-json-patch-10).

Demo

The current version should be deployed here:

Usage

Include the library files (see dist/ directory):

<script src="examples/js/angular.min.js"></script>
<script src="dist/angular-patch.js"></script>

Make sure the starcounterLib module (that comes from angular-patch.js) is loaded in ngApp. The basic usage is:

<html ng-app="starcounterLib">

Even simplier, you can use the directive ng-remoteapp that will inject module starcounterLib for you.

<html ng-remoteapp="list other modules here, divided by comma, starcounterLib does not have to be here">

From now on, changes in root scope will be sent to server.

More docs will follow soon

Further development

This is work in progress and it is not yet considered production ready. Please submit your comments in GitHub Issues board.