ArtisanTinkerer.github.io

Blog

View on GitHub

Why?

Being an average developer is not good enough for me, it’s time for an upgrade. It’s time to go from average to awesome.

Goals

Steps

  1. https://laracasts.com/series/laravel-vue-and-spas/
  2. VueSchool

Vue-router

https://vueschool.io/lessons/create-a-new-project-with-vue-router-using-the-vue-cli-ui

Routes in /router/index.js main.js mounts the app

App.vue is the single page.

<router-link to="/">Home</router-link> |

//renders the component
<router-view />

New routes need to be registered in the routes array/

Lazy loading and magic comments:

    path: "/hawaii",
    name: "hawaii",
    component: () => import(/* webpackChunkName: "hawaii" */ "../views/Hawaii")
  },```


Passing oarams to views:
```<router-link :to="{name:'DestinationDetails', params: {id:destination.id}}">```


### vue-cli

vue ui ```

Vuex