Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$location.replace is not implemented with Webpack #2850

Closed
micaelmbagira opened this issue Jul 4, 2016 · 3 comments
Closed

$location.replace is not implemented with Webpack #2850

micaelmbagira opened this issue Jul 4, 2016 · 3 comments
Labels
Milestone

Comments

@micaelmbagira
Copy link

micaelmbagira commented Jul 4, 2016

I just upgraded from alpha-5 to beta.1.
I changed this

@Injectable()
export class MyUIRouterConfig {
  configure(uiRouter: UIRouter) {
    uiRouter.urlRouterProvider.otherwise(() => uiRouter.stateService.go('App', null, null)); // here
    uiRouter.stateRegistry.root();
    INITIAL_STATES.forEach(state => uiRouter.stateRegistry.register(state));
  }
}

into

@Injectable()
export class MyUIRouterConfig {
  configure(uiRouter: UIRouter) {
    uiRouter.urlRouterProvider.otherwise('/'); // here
    uiRouter.stateRegistry.root();
    INITIAL_STATES.forEach(state => uiRouter.stateRegistry.register(state));
  }
}

I am testing default url redirection.
It works perfectly with SystemJS. But when I use Webpack, the url is redirected to / but the page is not loaded and I have the following error:

Error: $location.replace() not impl
at Object.loc.replace (eval at (http://localhost:3000/index.js:2747:2), :63:25)
at check (eval at (http://localhost:3000/index.js:1134:2), :48:23)

@benjamincombes
Copy link

Same problem for me.

@christopherthielen
Copy link
Contributor

I'll look into this for the next beta.

@christopherthielen christopherthielen added this to the 1.0.0-beta.2 milestone Jul 14, 2016
@hstarorg
Copy link

hstarorg commented Aug 2, 2016

Same problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants