tab1.page.ts 741 B

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