Created
November 7, 2017 23:37
-
-
Save gustavopinho/3577e6323ff1a60126c840423e5de6eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
| // Imports adicionados | |
| import { Observable } from 'rxjs/Observable'; | |
| // Serviço de tarefas | |
| import { TarefasProvider } from '../../providers/tarefas/tarefas'; | |
| // Modelo de tarefas | |
| import { Tarefas } from '../../models/tarefas' | |
| @IonicPage() | |
| @Component({ | |
| selector: 'page-tarefas-finalizadas', | |
| templateUrl: 'tarefas-finalizadas.html', | |
| }) | |
| export class TarefasFinalizadasPage { | |
| // Atributo de lista de tarefas | |
| tarefas: Observable<Tarefas[]>; | |
| constructor(public navCtrl: NavController, public navParams: NavParams, | |
| private tarefasProvider:TarefasProvider) { | |
| } | |
| // Método para exluir uma tarefa | |
| excluir(id: string) { | |
| this.tarefasProvider.excluir(id); | |
| } | |
| ionViewDidLoad() { | |
| this.tarefas = this.tarefasProvider.pegarTarefas(true); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment