简体   繁体   中英

Routing to same page/component

I have a problem, in my application after submitting a form it will ask for do you want to add one more item? and have 2 options "yes" or "no".If the user selecting no he will route to dash board and Yes he should stay there in the same page.I have tried it

``

  <input type="button" value="Yes" class="button small" @click="$router.go()" /> ``

its working fine normal but on deployment showing 404-not available.

In such situation to route in same page what we have to do?

It will be very helpful why its happening and what will be the solution for that. Thanks in advance

I think its better to render your form based on a value and when the user clicks on 'yes' button, you add to the value and actually another form renders, there is no need to call a router.go method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM