1.5.0 • Published 6 years ago

sanji-rest-ui v1.5.0

Weekly downloads
14
License
MIT
Repository
github
Last release
6 years ago

sanji-rest-ui

Sanji rest service is part of Sanji UI framework and also it is a angular module. It is just a restful wrapper and can switch protocol like websocket or others, default is http.

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

Dependencies

Installation

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

npm install sanji-rest-ui --save

How to use

You need to include module first.

let app = angular.module('webapp', ['sanji.rest'])

and then use rest as DI service.

class AppController {
  constructor(rest) {
    rest.get('/users/me')
    .then(data => {
      console.log(data);
    })
    .catch(data => {
      console.log(data);
    });

    rest.post('/login', { username: 'admin', password: 'xxxxx' })
    .then(data => {
      console.log(data);
    })
    .catch(data => {
      console.log(data);
    });
  }
}
AppController.$inject = ['rest'];

Contact

Author: Zack Yang © 2015

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

1.5.0

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.14

7 years ago

1.3.13

8 years ago

1.3.12

8 years ago

1.3.11

8 years ago

1.3.10

8 years ago

1.3.9

8 years ago

1.3.8

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago