Created
February 11, 2017 21:09
-
-
Save wharley/a5612fdd75988784ef87e8d1c4872324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { NavController, ViewController } from 'ionic-angular'; | |
import { HomeService } from './home.service'; | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html', | |
providers: [ | |
HomeService | |
] | |
}) | |
export class HomePage { | |
view: any; | |
data: any; | |
constructor(public navCtrl: NavController,public viewCtrl: ViewController, public service: HomeService) { | |
this.view = viewCtrl; | |
this.data = { | |
username: "", | |
password: "" | |
}; | |
} | |
login() { | |
this.service.getFunctions() | |
.subscribe( | |
datas => { | |
if(datas) | |
console.log(datas) | |
//this.view.dismiss(this.data) | |
else alert("usuario ou senha inválido") | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment