Able Pro
Angular
Angular
  • ✨Introduction
  • 🚀Quick Installation
  • 📂Directory Structure
  • 📄Page Structure
  • 🛠️Theme Configuration
  • 🎨Theme Layout
  • 📦Dependencies
  • 🎭Theme Structure
  • 📚How to
    • Dashboard as First Page
    • Login as First Page
    • Remove Authentication
    • Guard Children Routes
    • 🚫Remove Role Base Authentication
    • Role Base Authentication
  • 📅Changelog
  • 🆘Support
Powered by GitBook
On this page
  1. How to

Dashboard as First Page

How to set Dashboard as First page instead landing

This section explains how to set the Dashboard page as the default starting page, skipping the landing page, for cases where it is not needed.

AuthGuard is removed from routes to avoid login checks.

  1. Update route at: src/app/app-routing.module.ts

app-routing.module.ts
// angular import
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

// project import
import { AdminComponent } from './demo/layout/admin';
import { EmptyComponent } from './demo/layout/empty/empty.component';
import { GuestComponent } from './demo/layout/front/guest.component';
// import { AuthGuardChild } from './@theme/helpers/auth.guard';

const routes: Routes = [
{
    path: '',
    component: AdminComponent,
    // canActivateChild: [AuthGuardChild],
    children: [
    {
        path: '',
        redirectTo: '/dashboard/default',
        pathMatch: 'full'
    },
    {
        path: '',
        loadChildren: () => import('./demo/pages/dashboard/dashboard.module').then((m) => m.DashboardModule)
    },

      ...
      ...
  }
PreviousHow toNextLogin as First Page

Last updated 5 months ago

📚