I'm currently trying to switch from ui-router 1.0.0-alpha.5 to 1.0.0.b.3, and I don't know how to rewrite part of the permissions of my states. I am sure this is relative to "9) BC-BREAK: remove support for JIT resolution." https://github.com/angular-ui/ui-router/releases/tag/1.0.0-beta.1
but I'm not sure if I can save my solution, or if I have to move all my 8 transition permissions .onEnter.
Current code:
.state('main', {
abstract: true,
url: `^${BASE_URL}?appName`,
template: '<main></main>',
resolve: {
cms: (CmsService) => {
return CmsService.init();
},
gameDesc: (GameDescriptionService) => {
return GameDescriptionService.init();
},
cartInit: (cms, gameDesc, Cart) => {
return Cart;
},
stuffWithCart: (cartInit, Cart) => {
}
and the basket looks like this:
export default function (CmsService, GameDescriptionService) {
class Cart {
constructor() {
this.cms = CmsService.getCms();
this.gameDesc = GameDescriptionService.getDescription();
}
}
}
Thanks in advance.
source
share