Answers for "angularjs route"

5

angular router

const routes: Routes = [
  { path: '',   redirectTo: '/first-component', pathMatch: 'full' }, // redirect to `first-component`
  { path: 'first-component', component: FirstComponent },
  { path: 'second-component', component: SecondComponent },
  { path: '**', component: PageNotFoundComponent },  // Wildcard route for a 404 page
];
Posted by: Guest on June-17-2021
1

Angular route

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HeroesComponent } from './heroes/heroes.component';

const routes: Routes = [
  { path: 'heroes', component: HeroesComponent }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
Posted by: Guest on August-01-2021
0

Angular route

ng generate module app-routing --flat --module=app
Posted by: Guest on August-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language