Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created November 9, 2020 22:06
Show Gist options
  • Save blogcacanid/22502bcb658c1e07780cec6b1954976a to your computer and use it in GitHub Desktop.
Save blogcacanid/22502bcb658c1e07780cec6b1954976a to your computer and use it in GitHub Desktop.
app-routing.module.ts Authentication JWT Angular 9 Lumen 7
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RegisterComponent } from './register/register.component';
import { LoginComponent } from './login/login.component';
import { ProfileComponent } from './profile/profile.component';
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'profile', component: ProfileComponent },
{ path: '', redirectTo: 'home', pathMatch: 'full' }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment