Article From:https://segmentfault.com/q/1010000011701762
Question:

I have defined a route that can not pass parameters on the front page when the circular output routing address appears.

route,state,templateThe code is as follows:

route:

state:

template:

The problem now is that any routing with parameters cannot display the full address when looping around here, as shown in the following figure:

If I remove the parameters like this, I can show the complete address.

I don’t know if I described it clearly enough. Who has encountered the same situation? How to solve this problem?

Answer 0:

Such configuration
path: '/query/:id'
stayrouter-link :totime
There will be hints for missing parameters.
missing param for named route "Query": Expected "id" to be defined
If parameters are optional, please use
path: '/query/:id?'
Reference

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *