Skip to content

Instantly share code, notes, and snippets.

@eirikb
Last active January 10, 2019 19:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eirikb/68519d44a7486b6cf77a976b46579260 to your computer and use it in GitHub Desktop.
Save eirikb/68519d44a7486b6cf77a976b46579260 to your computer and use it in GitHub Desktop.
Add MDL to Vue
<style lang="scss">
@import "~material-design-lite/material.css";
</style>
import 'material-design-lite'
Vue.directive('mdl', {
inserted: el => componentHandler.upgradeElement(el)
})
<template>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" v-mdl>
Hello, world!
</button>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment