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

Error: setUrl() #2

Closed
junxianlim opened this issue Sep 17, 2016 · 2 comments
Closed

Error: setUrl() #2

junxianlim opened this issue Sep 17, 2016 · 2 comments

Comments

@junxianlim
Copy link

Hey all,

I just found out about a react implementation of ui-router and was playing around with it. The current version of ui-router-core from npm kept rendering setUrl error.

  • From urlRouter
    UrlRouter.prototype.push = function (urlMatcher, params, options) {
        var replace = options && !!options.replace;
        $location.setUrl(urlMatcher.format(params || {}), replace);
    };

Fixed it locally by changing setUrl to url. Thought I'd notify you awesome people here all as well. Thanks!

@wms
Copy link
Contributor

wms commented Sep 17, 2016

Hi @junxianlim,

I suspect this is because ui-router-react lists ^1.0.0-beta.1 as a dependency, but because beta2 is out now (which introduces this BC break), you're pulling that instead. Try adding beta1 as an exact dependency on your application until either:

  1. A version of ui-router-react supporting beta2 is released
  2. A version of ui-router-react which lists beta1 as an exact dependency is released

@elboman
Copy link
Member

elboman commented Sep 17, 2016

Hi! This is definitely because the core is listed as ^, my bad. For now the easy fix, as @warrenseymour already said, is to list the 1.0.0-beta.1 as a dep for your project.
Next version will be based off the beta 2 ;)

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

No branches or pull requests

3 participants