|
@@ -1,6 +1,7 @@
|
|
|
import { Component } from '@angular/core';
|
|
|
import { ModalController } from '@ionic/angular';
|
|
|
import { TaskModalComponent } from '../shared/task-modal/task-modal.component';
|
|
|
+import { DataService } from '../services/data.service';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-tab1',
|
|
@@ -11,7 +12,7 @@ import { TaskModalComponent } from '../shared/task-modal/task-modal.component';
|
|
|
export class Tab1Page {
|
|
|
currentDate: string;
|
|
|
|
|
|
- constructor(private modalCtrl: ModalController) {this.currentDate = new Date().toLocaleDateString();}
|
|
|
+ constructor(private dataService: DataService,private modalCtrl: ModalController) {this.currentDate = new Date().toLocaleDateString();}
|
|
|
|
|
|
async openTaskModal() {
|
|
|
const modal = await this.modalCtrl.create({
|
|
@@ -19,4 +20,6 @@ export class Tab1Page {
|
|
|
});
|
|
|
return await modal.present();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|