Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1.  const login =  this.restangular.one('/api/admin/login').customPOST(
  2.           { username: this.username, password: this.password},
  3.           '',
  4.           {},
  5.           {
  6.               'Content-Type': 'application/json',
  7.               'Access-Control-Request-Headers': 'Origin',
  8.               'Access-Control-Allow-Origin': '*'
  9.           }
  10.       ).subscribe($response => {
  11.           console.log($response.data.data);
  12.           console.log(login);
  13.       }, $error => {
  14.           console.log($error);
  15.       });
  16.       /*  const login =  this.restangular.one('/api/admin/login').post(
  17.               {},
  18.           ).subscribe($response => {
  19.               console.log($response.data.data);
  20.           }, $error => {
  21.               console.log($error);
  22.           });*/
  23.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement