[Vuejs]-How to use template inside template using vue.js & laravel?

0👍

You are just declaring the plugin. You have to "use" it, so Vue knows about it.

Also, that <template> makes no sense, you don’t want it there.

Here’s how it should be:

In the JavaScript code, activate the plugin through .use():

var VueGoogleMaps = require('vue2-google-maps');

// from the docs: https://www.npmjs.com/package/vue2-google-maps#with-npm-recommended
Vue.use(VueGoogleMaps , {
  load: {
    key: 'YOUR_API_TOKEN',
    v: '3.26',                // Google Maps API version
    // libraries: 'places',   // If you want to use places input
  }
});

var app = new Vue({
    el: '#participantLocationListApp',
})

HTML (remove the <template>):

<div class="panel panel-default card-view panel-refresh" id="participantLocationListApp">
    <gmap-map :center="center" :zoom="1" style="width: 100%; height: 400px"></gmap-map>
</div>

Leave a comment