vuejs / vue-router

🚦 The official router for Vue 2
http://v3.router.vuejs.org/
MIT License
18.99k stars 5.06k forks source link

[vue js] request #3655

Closed pipiscrew closed 3 years ago

pipiscrew commented 3 years ago

What problem does this feature solve?

Apart from the fabulous online doc, is any possibility for a matrix between vue2 with npm vs vue2. ASAP a complete example vue2 with routing.

A dozen of information can be found on net with many differences between versions.

the sample https://router.vuejs.org/guide/#javascript

const routes = [
  { path: '/foo', component: Foo },
  { path: '/bar', component: Bar }
]

how to declare the router, so after can say

router.push({ name: 'Foo' })

found the https://github.com/FranckFreiburger/vue3-sfc-loader

but has 2mb dependency :grinning:

What does the proposed API look like?

%

posva commented 3 years ago

Pushing by name is already in the docs 🤔 If you have a formal proposal, the best would be to open a PR.

Remember to use the forum or the Discord chat to ask questions!

pipiscrew commented 3 years ago

@posva

this is what was looking for https://github.com/pipiscrew/vue3_small_prjs/tree/main/vue2vanilla_retain_PHPSessionCookie