vue.js - Set a collection of components of VueJS for each Laravel view -


i'm building platform using laravel 5.2 , vuejs, finished first view start building next 1 i'm facing problem don't know how set collection of components other view, because if add componets needed views in laravel app.js big , want load components needed specific view.

this current structure landing page, app.js file contains following code:

import vue 'vue';  //components import component1 './components/landing/component1.vue'; import component2 './components/landing/component2.vue'; import component3 './components/landing/component3.vue';  new vue({   el: '#app',   components: {     component1,     component2,     component3   } }); 

and blade file inject vue components

@extends('layouts.public')  @section('title', 'welcome!!')  @section('content')    {{-- vue components --}}   <component1></component1>   <component2></component2>   <component3></component3> @stop 

so, know way this? because guides online read 1 view build more views /contact, /signup, /faq, etc.

kind regards!


Comments