AngularJS module for using's backend-as-a-service.

Added by: Sam Deering





Stars: 1

Watchers: 1

Forks: 1

Module Description

Build Status

A module for using in AngularJS applications.

NB: This is pre-pre-alpha.

To use, either clone the repository, or do:

$ bower install --save s-morgan-jeffries/angular-parse-interface

Include both the ngResource source file and the built module file in your index.html:

<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-parse-interface/dist/angular-parse-interface.js"></script>

Then include the module as a dependency of your app module:

angular.module('yourApp', ['angularParseInterface']);

The module creates the parseInterface service, which has a single method: createAppInterface. Use it like so:

var appConfig = {
        applicationId: 'your-parse-app-ID',
        restKey: 'your-parse-REST-API-key'

var appInterface = parseInterface.createAppInterface(appConfig);

The appInterface has four properties:

  • objectFactory: Call this with a className argument to create an angular Resource/Parse Object.
  • User: A special angular Resource decorated with signUp, signIn, signOut, and current (returns current user) methods
  • Query: A constructor that you call with a Resource argument and that returns a query builder.
  • getCloudCaller: A factory that takes a cloud function name and returns a function that will call the named cloud function asynchronously.
  • roleFactory: A factory that creates role objects that can be used for setting permissions.

I'll write clearer documentation when things are a little further along. In the meantime, feel free to look at the source code.

Forked! Again!

Module stats last updated: 2015-05-27 01:22:28

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!