import { Injectable } from '@angular/core' ; import { CanActivate , ActivatedRouteSnapshot , RouterStateSnapshot , Router } from '@angular/router' ; import { Observable } from 'rxjs' ; import { UserService } from '../services/user.service' ; import { NavController } from '@ionic/angular' ; import { DataService } from '../services/data.service' ; @ Injectable ( { providedIn : 'root' } ) export class AuthGuard implements CanActivate { constructor ( private router , private userService , private dataService , private navCtrl ) { } canActivate ( next , state ) { return true ; } }