Advertisement
Guest User

Untitled

a guest
Feb 11th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. import { Component } from '@angular/core';
  2. import { NavController, ViewController } from 'ionic-angular';
  3.  
  4. import { HomeService } from './home.service';
  5.  
  6. @Component({
  7. selector: 'page-home',
  8. templateUrl: 'home.html',
  9. providers: [
  10. HomeService
  11. ]
  12. })
  13. export class HomePage {
  14.  
  15. view: any;
  16. data: any;
  17.  
  18. constructor(public navCtrl: NavController,public viewCtrl: ViewController, public service: HomeService) {
  19.  
  20. this.view = viewCtrl;
  21. this.data = {
  22. username: "",
  23. password: ""
  24. };
  25. }
  26.  
  27. login() {
  28. this.service.getFunctions()
  29. .subscribe(
  30. datas => {
  31. if(datas)
  32. console.log(datas)
  33. //this.view.dismiss(this.data)
  34. else alert("usuario ou senha inválido")
  35. });
  36.  
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement