angular2 xhrfields withcredentials wahr

Ich versuche auf login zu einem system. Im Winkel 1, gab es Möglichkeiten,

withCredentials:true

Aber ich konnte nicht finden eine funktionierende Lösung in angular2

export class LoginComponent {
    constructor(public _router: Router, public http: Http, ) {

    }


    onSubmit(event,username,password) {
        this.creds = {'Email': '[email protected]','Password': '01010','RememberMe': true}
        this.headers = new Headers();
        this.headers.append('Content-Type', 'application/json');

        this.http.post('http://xyz/api/Users/Login', {}, this.creds)
              .subscribe(res => {
                  console.log(res.json().results);

              });
     }

}

InformationsquelleAutor harikrish | 2016-01-26

Schreibe einen Kommentar