Advertisement
Guest User

post

a guest
Aug 10th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import {Http} from '@angular/http';
  2.  
  3. export class Auth {
  4. public name : string;
  5. public pass : string;
  6. constructor(public http: Http) {
  7. }
  8. auth() {
  9. let url = '/conf/post_admin.php';
  10. let body = "username=" + this.name + "&password=" + this.pass;
  11.  
  12. this.http.post(url,body)
  13. .subscribe(data => {
  14.  
  15. console.log(data)
  16. });
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement