import { Injectable } from '@angular/core';
import { Http, Headers, Response, RequestOptions, } from '@angular/http';
@Injectable()
export class RoleService {
headers = new Headers({"Content-Type": "application/json"});
options = new RequestOptions({ headers: this.headers });
constructor(private http: Http) { }
getRoleList(data) {
return this.http.post('http://192.168.10.178:9080/role/getRole', data, this.options)
.toPromise()
.then(res => res.json().data)
.then(data => { return data; });
}
}
https://i.sstatic.net/nPiK8.png
Help me!! How to solve this ???