vue-inject-js
v1.0.0
Published
Inject Remote Js For Vue.js
Downloads
968
Maintainers
Readme
Vue Inject Js
Inject Remote Js For Vue.js 2.
Installation
Select one option:
- Install using npm
npm install vue-inject-js --save
You can omit the --save
option if using npm@^5
.
You can also use Yarn as:
yarn add vue-inject-js
In your JavaScript file:
import VueInjectJs from 'vue-inject-js'
- or -
var VueInjectJs = require('vue-inject-js')
- Embed script tag
<script src="https://unpkg.com/vue-inject-js/dist/vue-inject-js.min.js"></script>
Then register the component into Vue:
Vue.use(VueInjectJs)
Documentation
Using Inject Js is easy. The HTML code you need is the following:
<VueInjectJs src="https://unpkg.com/[email protected]/dist/jquery.js"/>
And no JS code is needed whatsoever, Inject Js works out of the box.
Props
The component needs some configuration, though. It's only one required option, so it remains pretty simple.
| Prop | Description | Type | Default | |------|-------------|------|---------| | src | Remote Javascript source that will be loaded. | String | required |
Check out changelog file.
License
Contribution
- @simamn The main author.
Questions
Feel free to contact me or create an issue
made with ♥