1

In my vue application I need an optional router like this

#/profile/(:user/)?task/current-task

Here I want user will be optional. if user not exit then I want to show current login user task. I know #/profile/(:user/)? it possible. But having children after an optional params not working for me. any suggestion?

1

1 Answer 1

1

It's possible

You can define #/profile/:user?/task/current-task

Demo

http://jsfiddle.net/29jvk913/

More nested params

http://jsfiddle.net/y3kbovhy/

Sign up to request clarification or add additional context in comments.

1 Comment

Right now I have such problem when my route end on optional params it removes from when you route in search for example ( /root/:id?) this works. But when you add path after optional params it doesn't remove anything (/root/:id?/example). Can you explain why this happening? How to make always removable?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.