Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the new router #218

Closed
tjvantoll opened this issue May 6, 2016 · 9 comments
Closed

Support the new router #218

tjvantoll opened this issue May 6, 2016 · 9 comments
Assignees
Labels
Milestone

Comments

@tjvantoll
Copy link

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 😀

@hdeshev hdeshev added this to the May milestone May 9, 2016
@vakrilov vakrilov self-assigned this May 9, 2016
@NathanWalker
Copy link
Contributor

NathanWalker commented May 25, 2016

@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
Copy link
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
Copy link

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

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

@LTMenezes
Copy link

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

@NathanWalker
Copy link
Contributor

@LTMenezes it's implemented in the latest 0.2.0 release. You can reference this excellent example: https://github.com/NativeScript/nativescript-angular/blob/master/ng-sample/app/examples/router/page-router-outlet-nested-test.ts

@denkomanceski
Copy link

@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
Copy link
Contributor

m-abs commented Jul 24, 2016

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
Copy link

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

@vakrilov
Copy link
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
Labels
Projects
None yet
Development

No branches or pull requests

8 participants