Skip to content

Support the new router #218

Closed
Closed

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 😀

Activity

  1. added this to the milestone on May 9, 2016
  2. self-assigned this
    on May 9, 2016
  3. NathanWalker commented on May 25, 2016

    @NathanWalker
    Contributor

    @vakrilov @hdeshev Just wanted to follow up on the status of this?
    As always anything I can help with on a branch to finish it up, may be at a standstill at moment? https://github.com/NativeScript/nativescript-angular/tree/new-router

  4. vakrilov commented on May 25, 2016

    @vakrilov
    Contributor

    @NathanWalker On the call withAngular team last week, Tobias waned us that they are preparing to land another big chunk of refactoring (a.k.a. breaking changes) on the router and suggested that we wait for it before starting to integrate. That's why we put this task temporary on hold.

  5. HerringtonDarkholme commented on Jun 15, 2016

    @HerringtonDarkholme

    It seems Angular router has changed a lot, but it gets stablized now.

    http://victorsavkin.com/post/145672529346/angular-router

  6. LTMenezes commented on Jul 6, 2016

    @LTMenezes

    @vakrilov Any news about the router v.3 implementation ?

  7. NathanWalker commented on Jul 6, 2016

    @NathanWalker
    Contributor
  8. denkomanceski commented on Jul 7, 2016

    @denkomanceski

    @NathanWalker Is it possible to use different transitions now ? In the previous router (which is deprecated atm) we were not able because "There is little value in implementing support for this with the current router-deprecated package. We'll add this feature when we integrate the new router."
    #202

  9. m-abs commented on Jul 24, 2016

    @m-abs
    Contributor

    What's the status of the following:

    • Clear history.
    • replaceState/Navigate without history
    • Page transitions/animations

    I see there are some examples of animation examples here https://github.com/NativeScript/nativescript-angular/tree/master/ng-sample/app/examples/animation, but can it be used for pages?

  10. denkomanceski commented on Jul 24, 2016

    @denkomanceski

    @m-abs Espeically the page transition thing.. I cannot let all of my pages to have same transition lol so its unusable..

  11. vakrilov commented on Jul 25, 2016

    @vakrilov
    Contributor

    Both page transitions and clearHistory are currently in progress. They will probably land in master (and in the @next respectively) sometime this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions