christopherthielen / ui-router-extras

THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
http://christopherthielen.github.io/ui-router-extras/
MIT License
917 stars 211 forks source link

Compatibility with new ui-router 1.0.0 #315

Open jbadeau opened 8 years ago

jbadeau commented 8 years ago

Hi,

Do you know if the latest release is compatible with the ui-router 1.0.0 code base?

More specifically, I am getting an exception when registering future states:

Error: Couldn't determine parent state of future state. FutureState:{"stateName":"main.foo","urlPrefix":"/foo","type":"ocLazyLoad","module":"foo","name":"main.foo","url":"^/foo"}

angular: 1.5.0 ui-router: 1.0.0-alpha.4 ui-router-extras: 0.1.2

$stateProvider.state('main', {
    abstract : true,
    url : '/main',
    controller : require('../controllers/mainController'),
    controllerAs : '$ctrl',
    template : require('text!../templates/mainTemplate.html'),
});

$futureStateProvider.futureState({
    'name' : 'main.foo',
    'url' : '/foo',
    'type' : 'ocLazyLoad',
    'module' : 'foo'
});

$futureStateProvider.futureState({
    'name' : 'main.bar',
    'url' : '/bar',
    'type' : 'ocLazyLoad',
    'module' : 'bar'
});

This code was working fine against ui-router 0.2.15

christopherthielen commented 8 years ago

future states are not compatible with ui-router 1.0, sorry.

UI-Router 1.0 final will probably be released without any future states support. I'd like to bake something like future states (but better, simpler) into a ui-router release after 1.0

rbarilani commented 8 years ago

@christopherthielen any update on this? I was super-excited to include lazy-load modules/future states in my app and BAM.... do you think that we some work is possible to make future states with parents working also with ui-router 1.0?

p.s. future states without parents are working with ui-router@1.0.0-alpha.5.

BTW thx a lot for your awesome modules.

christopherthielen commented 8 years ago

See https://github.com/christopherthielen/ui-router-extras/issues/336

rbarilani commented 8 years ago

:+1: For me this one can be closed. Looking forward for ui-router 1.0 next releases! Thanks.