{"id":13778157,"url":"https://github.com/jimrhoskins/angular-parse","last_synced_at":"2026-02-23T05:32:46.990Z","repository":{"id":6042966,"uuid":"7267554","full_name":"jimrhoskins/angular-parse","owner":"jimrhoskins","description":null,"archived":false,"fork":false,"pushed_at":"2015-09-30T08:56:16.000Z","size":815,"stargazers_count":182,"open_issues_count":12,"forks_count":38,"subscribers_count":14,"default_branch":"master","last_synced_at":"2026-01-23T22:32:07.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimrhoskins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-21T02:15:13.000Z","updated_at":"2025-01-02T01:10:59.000Z","dependencies_parsed_at":"2022-09-10T02:52:48.893Z","dependency_job_id":null,"html_url":"https://github.com/jimrhoskins/angular-parse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jimrhoskins/angular-parse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimrhoskins%2Fangular-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimrhoskins%2Fangular-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimrhoskins%2Fangular-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimrhoskins%2Fangular-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimrhoskins","download_url":"https://codeload.github.com/jimrhoskins/angular-parse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimrhoskins%2Fangular-parse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29738091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T04:51:08.365Z","status":"ssl_error","status_checked_at":"2026-02-23T04:49:15.865Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:00:51.666Z","updated_at":"2026-02-23T05:32:46.945Z","avatar_url":"https://github.com/jimrhoskins.png","language":"JavaScript","readme":"# Parse for AngularJS\n\n_This is pre-alpha/actively developed. There are no guarantees of\n  stability, but you are welcome to play around and submit issues_\n\nangular-parse is an [AngularJS](http://angularjs.org) module for\ninteracting with the [Parse](http://parse.com) [REST\nAPI](https://parse.com/docs/rest). It *does not* utlize the [Parse\nJavaScript API](https://parse.com/docs/js_guide) but instead is built\nfrom (mostly) scratch. The reason is the existing Parse JavaScript API\nis not ideal for AngularJS applications.\n\n# Why Angular-Parse\n\nThere are a few things that are not ideal about the existing Parse\nJavaScript API in AngularJS. The existing API is modeled after [Backbone\nModels](http://backbonejs.org/#Model) and the main problem is setters\nare used instead of object properties. `instance.set('property', 'value')` \ndoesn't really fit well with things like `ng-model`\n\nInstead, angular-parse is based loosely on [Spine\nModels](http://spinejs.com/docs/models) where properties directly\ndefined on the object are used. To facilitate this, when defining a\nmodel, it is \"configured\" by supplying the class name (as defined in\nParse) as well as which properties are part of that class.\n\nAngular-parse also uses promises for any methods making network calls.\n\n## Getting started\n\nInclude the JavaScript file\n\n```html\n\u003c!-- Include AngularJS --\u003e\n\u003cscript src=\"path/to/angular-parse.js\"\u003e\u003c/script\u003e\n```\n\nMake sure to add `\"Parse\"` as a dependency of your main module\n\n```javascript\nvar app = angular.module(\"YourApp\", [\"Parse\"])\n```\n\nAngular-parse also requires you provide the value \"ParseConfig\" as an\nobject with the following format\n\n```javascript\napp.config(function (ParseProvider) {\n  ParseProvider.initialize(\"PARSE_APPLICATION_ID\", \"PARSE_REST_API_KEY\");\n});\n```\n\n## Defining Models\n\nYou can define models by extending Parse.Model. You must call configure\non the class and pass it the Parse class name, and the name of any\nattributes of that class\n\nUsing CoffeeScript:\n```coffeescript\napp.factory 'Car', (Parse) -\u003e\n  class Car extends Parse.model\n    @configure \"Car\", \"make\", \"model\", \"year\"\n\n    @customClassMethod: (arg) -\u003e\n      # add custom class methods like this\n\n    customInstanceMethod: (arg) -\u003e\n      # add custom instance methods like this\n```\n\nUsing JavaScript:\n```javascript\n// Not implemented yet, sorry\n```\n\n## Using Models\n\nA model acts much the same as a normal JavaScript object with a\nconstructor\n\n### Creating a new instance\n\nYou can create a new instance by using `new`. Any attributes passed in\nwill be set on the instance. This does not save it to parse, that must\nbe done with `.save()`. The save method returns a promise, which is\nfulfilled with the instance itself.\n\n```javascript\nvar car = new Car({\n  make: \"Scion\",\n  model: \"xB\",\n  year: 2008\n});\n\ncar.isNew() === true;\ncar.objectId == null;\n\ncar.save().then(function (_car) {\n  _car === car;\n  car.isNew() === false;\n  car.objectId === \"...aParseId\";\n  car.createdAt === \"...aDateString\";\n  car.updatedAt === \"...aDateString\";\n}\n```\n\nIf the object has an objectId, it will be updated properly, and will not\ncreate a new instance. `save()` can be used either for new or existing\nrecords.\n\n### Getting an instance By Id\n\nThe `find` method on your model class takes an objectId, and returns a\npromise that will be fulfilled with your instance if it exists.\n\n\n```javascript\nCar.find(\"someObjectId\").then(function (car) {\n  car.objectId === \"someObjectId\";\n})\n```\n\n### Destroying an instance\n\nThe destroy method on an instance will destroy it set destroyed to true\n and set the item's objectId to null\n\n```javascript\nCar.find(\"someObjectId\").then(function (car) {\n  car.objectId === \"someObjectId\";\n\n  car.destroy().then(function (_car) {\n    car === _car;\n    car.destroyed === true;\n    car.isNew() === true;\n    car.objectId === null;\n  })\n})\n```\n\n### Defining a custom user class\n\nA simple User class is provided to you. However, you can subclass it:\n\n```coffeescript\nangular.module('Parse').factory 'ParseCustomUser', (ParseDefaultUser) -\u003e\n      class CustomUser extends ParseDefaultUser\n        @configure 'users', 'username', 'password', 'property'\n```\n\nIn this manner, all User instances returned by the Parse methods\nwill be of your custom class.\n\n### Contributing\n\nPull requests and issues are welcome.\n","funding_links":[],"categories":["Data Manage","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimrhoskins%2Fangular-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimrhoskins%2Fangular-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimrhoskins%2Fangular-parse/lists"}