bruh bruh - 1 year ago 267
Node.js Question

How to Route in VueJS 2.0

I want to click a link on my "Baseball Hats" page called, "Yankees Hats" and be redirected to a new view, "Yankees Hat Page".

From here the user should be able to select different hat colors: "Blue", "Green", "Black", etc., and see how many of this hat are in stock.

My understanding is to do this with "routes". .
However, VueJS states their router is not compatible with Vue.js 2.0. Installing their latest version via npm gives me: vue 2.2.0

I thought the way to navigate between views / pages in single page applications was to use routes. How does one handle navigation without this service?

Answer Source

Check the "releases" page on github- there's a vu2.0 compatible release candidate out already.

npm install vue-router@next

See the release notes for docs, the API changed a lot.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download