Closed marshall007 closed 7 years ago
I just stumbled across @aitboudad's note about this in https://github.com/angular/angular/issues/14795#issuecomment-283073477. Reading through that thread, I can't tell what the intended resolution is on the Angular side. I have submitted https://github.com/angular/angular/issues/15119 to get clarification on the expected behavior going forward.
I had a similar issue caused by the deep import of ROUTES
DI token.
The only working solution was creating two different repo branches (--ng4, --ng2) and importing the ROUTES
token (on --ng4) with:
import { ROUTES } from '@angular/router';
this solution doesnt work anymore. any other ideas ?
This is now resolved by https://github.com/ui-router/angular/commit/29f2d0e05e1cfddcfc4210c4222b7cc8dfe68bc8 and will be released as beta.6
Is there any way to get beta.6 at the moment? Or do we just need to download manually?
@ciel I tryed to use this branche https://github.com/ui-router/angular/tree/angular4 This worked for me. But now I downgraded to 2.3.1 and beta.5 https://github.com/ui-router/angular/issues/58
Thanks, I'll give that a try.
Beta.6 is released, please try it
Hi @christopherthielen . Please forgive my newb question. Can I get the Beta.6 release on NPM? When I execute npm info ui-router-ng2 I'm only shown up to beta.5
If it's not via NPM, what's the best way to get it?
Thanks.
{ name: 'ui-router-ng2', description: 'State-based routing for Angular 2', 'dist-tags': { latest: '1.0.0-beta.5' }, versions: [ '0.1.0-preview.0', ..... '1.0.0-beta.4', '1.0.0-beta.5' ], maintainers: [ 'christopherthielen christopherthielen@ikkyikkyikkypikangzoopboing.com' ], time:
Aah... scratch that!! .... I didn't notice this at the bottom of the npm info output.
deprecated: 'This npm package \'ui-router-ng2\' has been renamed to \'@uirouter/angular\'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/',
latest beta.6 release is compatible with Angular 4
Note: The package
ui-router-ng2
has been renamed to@uirouter/angular
This demo will likely be replaced by something involving the Angular-CLI
https://github.com/ui-router/quickstart-ng2/issues/32#issuecomment-304759155
In my case Angular Cli seemed to have imported
import { ActivatedRoute } from '@angular/router/src/router_state';
Changing it to
import { ActivatedRoute } from '@angular/router';
solved my problem. Don't know the reason behind it...but worked
Using angular
v4.0.0-rc.2
(and cliv1.0.0-rc.1
), it appears the deep reference to@angular/router/src/router_config_loader
is broken.https://github.com/ui-router/ng2/blob/e9705b00f90295c538dbfb568178801939ca6c1e/src/uiRouterNgModule.ts#L13
I couldn't tell by looking at their UMD bundles if the default
@angular/router
exports have changed sincev2.x
, butimport { ROUTES } from '@angular/router'
appears to work. I know you guys are waiting on upstream fixes for making@ngtools/webpack
router-agnostic. In the meantime is there a way we can supportv4.x
as well?