tab1.page.ts 581 B

12345678910111213141516171819202122232425
  1. import { Component } from '@angular/core';
  2. import { AlertController } from '@ionic/angular';
  3. @Component({
  4. selector: 'app-tab1',
  5. templateUrl: 'tab1.page.html',
  6. styleUrls: ['tab1.page.scss']
  7. })
  8. export class Tab1Page {
  9. constructor(private alertController: AlertController) {}
  10. async openModal() {
  11. const alert = await this.alertController.create({
  12. header: '提示',
  13. message: '弹窗了',
  14. buttons: ['确定']
  15. });
  16. await alert.present();
  17. }
  18. blueColor:boolean=false;
  19. toggleButtonColor(habit:string){
  20. this.blueColor=!this.blueColor;
  21. }
  22. }