Sha256: c482197c3e05a053f0a0ace514c624fabaac3a81c0e4fe9340316924bd4c376e
Contents?: true
Size: 861 Bytes
Versions: 5
Compression:
Stored size: 861 Bytes
Contents
// Generated by Vue on Rails https://github.com/vueonrails/vueonrails // Display this Vue component by adding `require('./<%= name %>')` to app/javascript/packs/application.js // Generate a component part like this by running command `rails generate vue something` import TurbolinksAdapter from 'vue-turbolinks'; import Vue from 'vue.esm' <% if options['seperate'] -%> import App from '@/<%= name %>/<%= name %>.vue' <% else -%> import App from '@/<%= name %>.vue' <% end -%> Vue.use(TurbolinksAdapter) document.addEventListener('turbolinks:load', () => { //isView helps to show certain of Specific-page Vue approach. //You can change ### to 'pages#index' or you can remove it if you are not using it if(isView("###")){ const <%= name %> = new Vue({ render: h => h(App) }).$mount('#<%= name %>') console.log({<%= name %>}) } })
Version data entries
5 entries across 5 versions & 1 rubygems