Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

AngularJS: Routing with URL having optional parameters

$
0
0
I have a URL in my app.js containing routes. lets say the url is:
/api/:opt1/:opt2/:opt3/users

I want that my url will work in any case, i should able to ignore the
optional parameters( opt1, opt2 or opt3, may be all or few). How can I
achieve this.

is there any way that i can call $location.path('/users'), and i can
specify also what are the values of the optional param ?

Please suggest.

Viewing all articles
Browse latest Browse all 6551

Trending Articles