Skip to content

Instantly share code, notes, and snippets.

@mathewsanders
Created February 20, 2016 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathewsanders/0b9153511448783d270a to your computer and use it in GitHub Desktop.
Save mathewsanders/0b9153511448783d270a to your computer and use it in GitHub Desktop.
Design in the browser, activity 3: create main.js
// import Vue framework
import Vue from 'vue'
// turn on dubugging messages
Vue.config.debug = true
// import our CafeCard component
import CafeCard from './CafeCard.vue'
// tell vue that we'll use <cafe-card> as the tag for our component
Vue.component('cafe-card', CafeCard)
// start vue, and tell it that it should work across the scope of the 'body' element
new Vue({
el: 'body'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment