Skip to content
  • Sponsor NativeScript/nativescript-angular

  • Notifications You must be signed in to change notification settings
  • Fork 241

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 😀

Activity

added this to the May milestone on May 9, 2016
self-assigned this
on May 9, 2016
NathanWalker

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

vakrilov

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.

HerringtonDarkholme

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

LTMenezes

LTMenezes commented on Jul 6, 2016

@LTMenezes

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

NathanWalker

NathanWalker commented on Jul 6, 2016

@NathanWalker
Contributor
denkomanceski

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

m-abs

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?

denkomanceski

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..

vakrilov

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.

2 remaining items

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

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Support the new router · Issue #218 · NativeScript/nativescript-angular