Thursday, July 16, 2020

Setting Route code

const appRoutes: Routes = [
    {
        path: "home",
        component: HomeComponent
    },
    {
        path: "employees",
        component: EmployeeListComponent
    },
    {
        path: "**",
        redirectTo: "/home",
        pathMatch : "full"
    }
];

@NgModule({
    imports: [BrowserModule, FormsModule, HttpModule, RouterModule.forRoot(appRoutes)],
    declarations: [AppComponent, EmployeeComponent, TutorialComponent, EmployeeListComponent,
        EmployeeTitlePipe, EmployeeCountComponent, SimpleComponent],
    bootstrap: [AppComponent]
})

No comments:

Post a Comment

Two Factor Authentication using .Net Core

Install Package dotnet add package GoogleAuthenticator --version 3.1.1 Model Changes public bool IsAuthenticatorReset { get; set; } public s...