dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_HomePageModule cluster_HomePageModule_imports cluster_HomePageModule_declarations AdminHomePage AdminHomePage HomePageModule HomePageModule AdminHomePage->HomePageModule UserHomePage UserHomePage UserHomePage->HomePageModule CoreModule CoreModule CoreModule->HomePageModule

File

src/app/home/home.module.ts

Imports

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { CommonConsumptionModule } from '@project-sunbird/common-consumption';
import { IonicModule } from '@ionic/angular';
import { UserHomePage } from './user-home/user-home.page';
import { TranslateModule } from '@ngx-translate/core';
import { PipesModule } from '@app/pipes/pipes.module';
import { AdminHomePage } from './admin-home/admin-home.page';
import { CoreModule } from '../manage-learn/core/core.module';
import { UserTypeGuard } from './user-type.guard';
import { ComponentsModule } from '@app/app/components/components.module';

const routes: Routes = [
  {
    path: '',
    children: [],
    pathMatch: 'full',
    canActivate: [UserTypeGuard]
  },
  {
    path: 'user',
    component: UserHomePage
  },
  {
    path: 'admin',
    component: AdminHomePage
  }
];
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    CommonConsumptionModule,
    ComponentsModule,
    RouterModule.forChild(routes),
    TranslateModule.forChild(),
    PipesModule,
    CoreModule
  ],
  declarations: [UserHomePage, AdminHomePage],
  providers: [UserTypeGuard]
})
export class HomePageModule {}

results matching ""

    No results matching ""