Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nichobbs/parse-angular

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

parse-angular

Utilities for working with Parse.com data.

Check out my blog post for a more detailed walkthough.

Create a new object

//create new contact record from string
$scope.newContact = new ParseObject('Contact', ['firstName','lastName','email']);

/* OR */

//create new contact record from parse object instance
var Contact = Parse.Object.extend('Contact');
$scope.newContact = new ParseObject(new Contact(), ['firstName','lastName','email']);

We can now bind $scope.newContact to any directive with ng-model to modify or display the object properties.

<input type="text" ng-model="newContact.firstName" />
<input type="text" ng-model="newContact.lastName" />
<input type="text" ng-model="newContact.email" />
<button ng-click="newContact.save()">Save</button>

Retrieving records

var query = new Parse.Query(Parse.Object.extend('Contact'));
ParseQuery(query, {functionToCall:'first'}).then(function(obj){
    $scope.newContact = new ParseObject(obj, ['firstName','lastName','email']);
});

This creates a query to retrieve the first record from the Contact class. The returned object is then wrapped in an instance of my ParseObject function allowing the fields to be accessed via the object properties.

About

Utilities for working with Parse.com data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 97.3%
  • CSS 2.7%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.