Hacker News new | ask | show | jobs
by dfsegoat 3561 days ago
Awesome - thanks so much for this from a team running 1.3 in production (and looking now at moving to 2).

Just curious if you are indeed saying that the built-in router allows you to do EVERYTHING you could do with ui-router (nested states / targeted views etc)? I was planning on sticking with ui-router-ng2 when we kick over to angular 2.

How about testing? Was that difficult moving test suites over?

3 comments

I didn't have to migrate tests over since I was started with a fresh project in Angular 2.

Angular Router does allow nested states: - https://angular.io/docs/ts/latest/guide/router.html - https://angular.io/docs/ts/latest/api/router/index/Router-cl...

I don't quite recall what "targetted views" mean?

I think targeted views means multiple <router-outlet>s, which it does appear to support:

> A template may hold exactly one unnamed <router-outlet>. The router supports multiple named outlets, a feature we'll cover in future.

About testing: e2e test will take almost 0 efforts to migrate, unit-tests will be rewritten completely (although your code too, so nothing wrong with it).
Should be noted that UI-router supports ng2 as well (and React!)