Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import { Http, Headers, Response, RequestOptions, } from '@angular/http';
  3. @Injectable()
  4. export class RoleService {
  5. headers = new Headers({"Content-Type": "application/json"});
  6. options = new RequestOptions({ headers: this.headers });
  7. constructor(private http: Http) { }
  8.  
  9. getRoleList(data) {
  10. return this.http.post('http://192.168.10.178:9080/role/getRole', data, this.options)
  11. .toPromise()
  12. .then(res => res.json().data)
  13. .then(data => { return data; });
  14. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement