-
Notifications
You must be signed in to change notification settings - Fork 211
Otherwise "/" #124
Comments
Can you put this example into a plunk for me? |
Sorry, I forgot to mention this bug occurs with html5Mode enabled. Here an example http://plnkr.co/edit/qPBD4M0k6g8y3p95cTqP |
@raphaelluchini I downloaded your plunk, enabled HTML5 mode, and launched a http server (
|
Yes!, you are correct, but try to type directly in the brower: http://localhost:8889/undefined |
@raphaelluchini Give me exact steps on how can I reproduce what you are seeing. Also, you say you can type "/undefined" directly into the location bar and it works fine if you set otherwise to "/home", for instance, correct? This kind of information would have been nice in the original bug report :) |
Are you correct again :P We are getting 404 because this http-server does not support redirect rules. I'm using nginx to staging and browserSync to dev environment, this bug occurs in both cases. Anyway I'll create a sample in a repository with browerSync configurations or if do you have experience with nginx I also could include as well. |
I don't know either browserSync nor nginx, so go with whatever is easiest to set up. |
Ok, about your last question, the bug occurs when we have any url:"/" route setted, and doesn't matter what otherwise is setted. |
Interesting. Get that browserSync config added to the plunk and give me step by step instructions to reproduce. Thanks! |
Ok, I got it, actually there is another trick, this bug only appears with "/" setted and with async requests, I've created a sample with setTimeout only to test, in my current project I'm using require(Webpack). Here the example https://github.com/raphaelluchini/ui-router-extras-otherwise-bug run npm install and then gulp serve ;) |
Type /something, going to work, then change the 'url': '/home', to 'url': '/' and otherwise to "/", and then try again /something |
Made some progress. This same bug can be triggered from your example when home is mapped to This has something to do with futurestate url's having So typing in |
Awesome! I can't wait to be released :) When do you plan to release it? Thanks! |
@raphaelluchini 0.0.12 released. Also please responde in #140 |
Hello,
When I use a futureState
url:'/'
and otherwise('/') the router isn't calling otherwise. When I use onlyurl:'/home'
works.Example:
I've tried to fix, and now it's working, but there are some tests failing, when I get time I'll try to fix them.
The text was updated successfully, but these errors were encountered: