1

I have this URL working with ui-router: http://example.com/param1, so home (/) with one pending parameter, using:

...state("home",{ url: "/:id", template...

However when I add a second parameter url: "/:id1/:id2", the first param is interpreted as a directory and all files are fetched like http://example.com/param1/assets/angularjs.min.js

What do I have to do to have multiple parameters?

1
  • 1
    It seems like a problem with your server side routing, as opposed to a problem with Angular Commented Jan 18, 2016 at 17:47

1 Answer 1

1

Thanks for the hint, it was a wrong htaccess code. This one is working:

    RewriteEngine on

    # Don't rewrite files or directories
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Rewrite everything else to index.html to allow html5 state links
    RewriteRule ^ index.html [L]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.