Skip to content

Commit

Permalink
clean up JS getting started guide. AEROGEAR-747
Browse files Browse the repository at this point in the history
  • Loading branch information
lholmquist committed Mar 11, 2013
1 parent 092c7ca commit 4ee3e1f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions docs/guides/GetStartedAeroGearJS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ To get the list of members from the server, all we need to do is use the read()
memberPipe.read({
success: function( data ) {
...
$('#members').empty().append(buildMemberRows());
$( "#members" ).html( buildMemberRows() );
}
});

Since our pipe is using the default REST adapter and we have overridden the baseURL property, the read method will make a request to http://localhost:8080/js-kitchensink/rest/members

We specify a success callback( an error callback can also be added ) and in the callback we add our data from the response to the MemberStore.
We specify a success callback( an error callback should also be added ) and in the callback we add our data from the response to the MemberStore.

MemberStore.save( data );

Expand All @@ -118,15 +118,6 @@ To access our data from the store, all we need to do is call the read() method o

We are using the default "Memory" adapter for our store, which is just an array.

To save data to the server all we need to do is call the pipes save() method

memberPipe.save( memberData, {
success: function( data ) { ... },
error: function( error ) { ... }
})

The save method also takes success and error callbacks.

## Wrapping Up

This tutorial is only a small part of what AeroGear.js can do. Stay tuned for more Getting started guides.
Expand Down

0 comments on commit 4ee3e1f

Please sign in to comment.