import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { FormsModule } from '@angular/forms' ; import { IonicModule } from '@ionic/angular' ; import { ProfilePage } from './profile.page' ; import { RouterModule , Routes } from '@angular/router' ; import { ProfilePageResolver } from './profile.resolver' ; import { AngularFireAuthGuard , redirectUnauthorizedTo } from '@angular/fire/auth-guard' ; const redirectUnauthorizedToLogin = ( ) => redirectUnauthorizedTo ( [ 'sign-in' ] ) ; const routes = [ { path : '' , component : ProfilePage , canActivate : [ AngularFireAuthGuard ] , data : { authGuardPipe : redirectUnauthorizedToLogin } , resolve : { data : ProfilePageResolver } } ] ; @ NgModule ( { imports : [ CommonModule , FormsModule , IonicModule , RouterModule . forChild ( routes ) , ] , declarations : [ ProfilePage ] , providers : [ ProfilePageResolver ] } ) export class ProfilePageModule { }