daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. login(username, password){
  2.     return Observable.create(observer => {
  3.       return this.http.post(this.BACKEND_URL + '/login', {username: username, password: password})
  4.       .map(res => res.json())
  5.       // .catch(this.handleError)
  6.       .subscribe(success => {
  7.         // this.data = data;
  8.         observer.next({success: true, data: success});
  9.         observer.complete();
  10.       },
  11.       error => {
  12.         observer.next({success: false, data: error})
  13.       })
  14.     })
  15.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top