sanji-exception-ui

1.3.0 • Public • Published

sanji-exception-ui

Sanji exception service is part of Sanji UI framework and also it is a angular module. It can catch application exception gracefully.

NPM Package Quality Build Status Coverage Status Codacy Badge dependencies devdependencies semantic-release Commitizen friendly

Dependencies

Installation

Sanji exception service is based on es6 + webpack to development and embrace npm to install it.

npm install sanji-exception-ui --save

How to use

You need to include module first.

angular.module('webapp', ['sanji.exception'])

and then use exception as DI service. exception service accounts for catching application exception gracefully.

class AppController {
  constructor($http, exception) {
    $http.get('/resources')
    .then(res => {
      console.log('get resources success');
    })
    .catch(exception.catcher('get resources fail'));
  }
}
AppController.$inject = ['$http', 'exception'];

References

Contact

Author: Zack Yang © 2015

Support: if you find any problems with this library, open issue on Github

Readme

Keywords

Package Sidebar

Install

npm i sanji-exception-ui

Weekly Downloads

3

Version

1.3.0

License

MIT

Last publish

Collaborators

  • zack9433