Skip to content

Instantly share code, notes, and snippets.

@Nathan-Nesbitt
Last active June 18, 2020 17:41
Show Gist options
  • Select an option

  • Save Nathan-Nesbitt/31aae8ec487e8dd29a2e9ed7d83fc2f7 to your computer and use it in GitHub Desktop.

Select an option

Save Nathan-Nesbitt/31aae8ec487e8dd29a2e9ed7d83fc2f7 to your computer and use it in GitHub Desktop.
Changes to routing in Angular NativeScript Application to Redirect to Proper Page
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
];
import { HomeComponent } from './home/home.component';
import { ComponentExampleComponent } from './component-example/component-example.component';
const routes: Routes = [
{ path: '', redirectTo: '/exampleComponent', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'exampleComponent', component: ComponentExampleComponent },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment