Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement