Socket
Book a DemoInstallSign in
Socket

ember-promise

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-promise

A simple promise object that will wrap xhr resolve/reject with an ember.run

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

Ember-promise

Build Status

Description

A simple promise object that will wrap xhr resolve/reject with an ember.run

Installation

# install via npm
$ npm install ember-promise --save-dev

Basic Usage

import Ember from 'ember';
import PromiseMixin from 'ember-promise/mixins/promise';

var PeopleRoute = Ember.Route.extend({
    model: function() {
        var people = [];
        PromiseMixin.xhr("/api/people", "GET").then(function(response) {
            response.forEach(function(person) {
                people.pushObject(Ember.Object.create(person));
            });
        });
        return people;
    }
});

export default PeopleRoute;

Running the unit tests

npm install
ember test

Example project

https://github.com/toranb/ember-cli-store-example

License

Copyright © 2015 Toran Billups http://toranbillups.com

Licensed under the MIT License

Keywords

ember-addon

FAQs

Package last updated on 26 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.