[Vuejs]-Vue.js pretty-checkbox-vue install and get it to run

0👍

If you’re planning to use that component globally inside your app, and you’re a beginner, I’d recommend you install it as a module. First, run npm i --save-dev pretty-checkbox-vue in your project folder. Make sure you’ve installed the package on your project directory, so pretty-checkbox-vue is actually on node_modules folder of your specific project with all other project dependencies, not just a random folder elsewhere.

Then just paste this code

import PrettyCheckbox from 'pretty-checkbox-vue';

Vue.use(PrettyCheckbox);

in main.js

Make sure all your imports are there before the rest of your code starts.

After the installation, just follow the instructions and use that component in any template throughout the project.

If you’re getting errors while in development mode, try npm install on your project and npm run serve again.

Leave a comment