Category : vue-router

I have a laravel collection that should pass json data to a vue component $problems = $maintenance->getMaintenanceTypes(); return new MaintenanceTypesCollection($problems); I’m then creating a radio button using that json collection <div v-for="m_type in maintenance_types" :key="m_type.id"> <input type="radio" v-model="form.m_type" :value="m_type.id" :id="m_type.id"> <label :for="m_type.id">{{ m_type.problem }}</label> </div> and the data is being passed well when I’m using ..

Read more

I am trying to load the vue router pages. Not sure what is wrong. Here is what I have done. In router.js file I have import Vue from ‘vue’ import Router from ‘vue-router’ Vue.use(Router) import testPage from ‘./test.vue’; const defaultRoutes = [ {path: ‘/test’, component: testPage} ] export default new Router({ mode: ‘history’, defaultRoutes }) ..

Read more

This are butons in vue.js template Problem is that a have to refresh page after customer is logged in if I want to see v-if=”isLoggedIn” button. Without refresh I can see only v-if=”!isLoggedIn”. How can I change $router.push <div v-if=”!isLoggedIn”> <button class=”col-md-4 b-primary float-left” @click=”login”>Login</button> </div> </div> <div v-if=”isLoggedIn”> <div class=”col-md-9″> <input id=”address” type=”text” class=”form-control” ..

Read more