How to use the nativescript-angular/router.nsProvideRouter function in nativescript-angular

To help you get started, we’ve selected a few nativescript-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NathanWalker / ShoutOutPlay / app / app.routes.ts View on Github external
// export const routes: RouterConfig = [
//   { path: "", component: SearchComponent },
//   { path: "playlist", component: PlaylistComponent },
//   { path: "shoutout", component: ShoutOutListComponent },
//   { path: "theme", component: ThemeComponent },
//   { path: "general", component: GeneralComponent },
//   { path: "help", component: HelpComponent },
//   { path: "about", component: AboutComponent },  
//   { path: "intro", component: IntroComponent },
//   { path: "record", component: RecordComponent },  
//   { path: "playlist/:id", component: PlaylistDetailComponent },
//   { path: "welcome", component: WelcomeComponent }
// ];

export const APP_ROUTES_PROVIDER = [
  nsProvideRouter(routes, {
    enableTracing: false
  })
]
github burkeholland / nativescript-photos-near-me / app / app.routes.ts View on Github external
import {RouterConfig} from "@angular/router";
import {nsProvideRouter} from "nativescript-angular/router";
import {MapComponent} from "./components/map-component/map.component";
import {ImagesListComponent} from "./components/imagesList-component/imagesList.component";
import {ImageComponent} from "./components/image-component/image.component";

export const routes: RouterConfig = [
  { path: "", component: ImagesListComponent },
  { path: "map-component", component: MapComponent },
  { path: "image-component/:photo_id/:user_id", component: ImageComponent }
];

export const APP_ROUTER_PROVIDERS = [
  nsProvideRouter(routes, {})
];
github NativeScript / sample-Groceries / app / app.routes.ts View on Github external
import { RouterConfig } from "@angular/router";
import { nsProvideRouter } from "nativescript-angular/router";

import { LoginComponent } from "./login/login.component";
import { GroceriesComponent } from "./groceries/groceries.component";
import { AuthGuard } from "./auth.guard";

export const routes: RouterConfig = [
  { path: "", component: GroceriesComponent, canActivate: [AuthGuard] },
  { path: "login", component: LoginComponent }
];

export const APP_ROUTER_PROVIDERS = [
  nsProvideRouter(routes, { enableTracing: false }),
  AuthGuard
];