Code Monkey home page Code Monkey logo

availity-angular's Introduction

availity-angular

Availity Angular SDK

License Bower Dependency Status Build

Table of Contents

Intro

Directory Layout
.
├── /dist/                      # Assets ready for distribution
├── /node_modules/              # 3rd-party libraries and utilities
├── /docs/                      # SDK documentation and samples
├── /gulp/                      # Gulp tasks and utility classes
│── gulpfile.js                 # Configuration file for automated builds
│── bower.json                  # Bower list of 3rd party libraries
└── package.json                # NPM list of 3rd party libraries and utilities


## Demo
[http://demo.availity.com/public/apps/availity-angular](http://demo.availity.com/public/apps/availity-angular)


## Supported Browsers

* Internet Explorer 8 and newer
* Google Chrome (latest version)
* Mozilla Firefox (latest version)

> Other browsers should be supported as well but you may experience some issues.


## Quickstart
Install the Availity Angular SDK with Bower.

>
```bash
$ bower install availity-angular --save

Angular

Core Module

The module availity are Angular services and utilities for building web applications. These include:

Asynchronous Requests & Responses

Not all Availity Rest services support asynchronous requests/responses. Please check the documentation at https://developer.availity.com for support.

Angular API Rest services created from api-factory.js have been enhanced to support Availity Rest asynchronous requests. In essence, if api-factory.js detects an asynchronous response, it will automatically poll Availity Rest services for the real response for about 30 seconds. The default starting poll interval is 1 second with a decay factor of 1.2. If a proper response isn't received with in the max interval polling time the Angular ajax promise will get rejected. This behavior is transparent to users of Angular services that have been extended from api-factory.js.

As the contract changes between the client and server for async request/response, api-factory.js will be updated accordingly.

Usage
  • Create a new API Resource
var restServiceResource = new AvApiResource('/some/rest/path');
  • Server responds with asynchronous payload with Status Code: 202 OK with the location header set
access-control-allow-origin:*
cache-control:public, max-age=0
connection:keep-alive
content-encoding:gzip
content-type:application/json
date:Sat, 04 Apr 2015 14:16:13 GMT
etag:W/"b27-3834658027"
last-modified:Tue, 31 Mar 2015 17:54:52 GMT
transfer-encoding:chunked
vary:Origin, Accept-Encoding
# Aries rest response with # Header with ping URL
Location: http://localhost:3000/some/rest/path
  • Use the API service with optional notification callback
restServiceResource.query().then(function(successResponse) {
  // success code goes here :)
}, function(errorResponse){
  // error code goes here :(
}, function(notifyResponse) {
  // notification response contains the json data with poll information
});
  • Override polling interval options per request
restServiceResource.query({
    pollingInterval: 2000,
    pollingMaxInterval: 10,
    pollingDecay: 1.8
}).then(function(successResponse) {
  // success code goes here :)
}, function(errorResponse){
  // error code goes here :(
}, function(notifyResponse) {
  // notification response contains the json data with poll information
});
  • Specify cache busting per request
restServiceResource.query({
    cacheBust: true
}).then(function(successResponse) {
  // success code goes here :)
}, function(errorResponse){
  // error code goes here :(
}, function(notifyResponse) {
  // notification response contains the json data with poll information
});

UI Module

The module availity.ui is a set of Angular services and directive wrappers around jQuery plugins. These include:

Acknowledgments

The Availity Angular lib was heavily inspired by multiple open source frameworks. If for some reason a library could not be used directly (IE8 limitation), we've reused that projects code directly in this project. Please check out the libs below for some beautifully written code.

Authors

Robert McGuinness

Bobby Bennett

Javier Fernandez-Ivern

Danny Noler

License

Copyright (c) 2016 Availity, LLC

availity-angular's People

Contributors

acouchman avatar andrewaramsay avatar bobbennett avatar derekonay avatar dnoler avatar hoop33 avatar ivern avatar jsarman avatar jselden avatar karikkato avatar kaseypowers avatar rjventrone avatar robmcguinness avatar sgillespie avatar thesharpieone avatar williamfayette avatar

Watchers

 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.