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:
- or -
var VueInjectJs =
- Embed script tag
Then register the component into Vue:
Vue
Documentation
Using Inject Js is easy. The HTML code you need is the following:
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 ♥