Skip to content

Support the new router #218

Closed
Closed
@tjvantoll

Description

@tjvantoll

I figured this is one of those things we haven’t gotten around to quite yet, but I thought I’d create an issue to track this.

@NathanWalker and I gave it a shot real quick the code below.

import {Component} from "@angular/core";
import {HTTP_PROVIDERS} from "@angular/http";
import {Routes, ROUTER_PROVIDERS} from "@angular/router";
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "nativescript-angular/router";
import {LoginPage} from "./pages/login/login.component";
import {ListPage} from "./pages/list/list.component";

@Component({
  selector: "main",
  directives: [NS_ROUTER_DIRECTIVES],
  providers: [HTTP_PROVIDERS, NS_ROUTER_PROVIDERS, ROUTER_PROVIDERS],
  template: "<page-router-outlet></page-router-outlet>"
})
@Routes([
  { path: "/Login", component: LoginPage },
  { path: "/List", component: ListPage }
])
export class AppComponent {}

But I get the error below:

May  6 15:52:50 107-1-111-1-ip-static sampleGroceries[6589]: CONSOLE ERROR file:///app/tns_modules/zone.js/dist/zone-node.js:421:23: Error: Uncaught (in promise): EXCEPTION: Error in :0:0
    ORIGINAL EXCEPTION: not implemented
    ERROR CONTEXT:
    [object Object]

I’m guessing because we don’t support the new router quite yet.

Thanks 😀

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions