Giter Site home page Giter Site logo

emberx-xml-http-request's Introduction

emberx-xml-http-request

Easily achieve beautiful, transparent uploads and downloads with a reactive XmlHttpRequest

emberx-xml-http-request is an ember binding to the x-request library

It allows you to declaratively make xml http requests in your templates, so that you can track both their upload and download progress. To use it, just drop it into your template like so:

{{x-xml-http-request method="PUT" url=http://fileupload.com data=file as |xhr|}}
  name: {{file.name}}<br/>
  bytes uploaded: {{xhr.upload.loaded}} <br/>
  bytes total: {{xhr.upload.total}} <br/>
  percentage complete: {{xhr.upload.percentage}}
{{/x-xml-http-request}}

All of the properties of the the xhr param, including readyState, status, response, responseText, etc... are reactive and can be bound to in templates, and can also be used as the input for other computed properties.

This is particularly useful in tracking the progress of an upload or a download.

Because xhr radiates all information about its progress, building UIs to track it are a snap.

For more details on which properties are available see the documentation for x-request

Installation

ember install emberx-xml-http-request

emberx-xml-http-request's People

Contributors

cowboyd avatar ember-tomster avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.