Yaniv Efraim
Yaniv Efraim

Reputation: 6711

Angular 2.0 with ui-router

I am upgrading an application which heavily uses ui-router.

I am trying to upgrade a directive which has a ui-view in its template (to be an Angular 2 Component using the UpgradeAdapter).

It does not work.. (I guess that Angular 2.0 is not working with the ui-router, yet?). Am I right? Do we know when ui-router be Angular 2.0 ready?

Should I upgrade my ui-router and use the new Angular 2 router? This is not straight forward upgrade because I heavily use the resolve feature, which is not supported in the new router!

Upvotes: 0

Views: 2785

Answers (2)

David
David

Reputation: 16067

Update: I've just managed to do this. Here's an example hybrid application in the process of being upgraded from NG1 to NG2, with both versions of UI router: https://github.com/ui-router/sample-app/tree/hybrid-angular1-angular2

Upvotes: 1

Estus Flask
Estus Flask

Reputation: 223249

There are some hints that it will happen sooner or later. Probably not on the day of 2.0 release.

Currently UI Router can be used in 1.x application until component router or uniform UI Router will come up.

Upvotes: 1

Related Questions