https://github.com/rnkit/vue-inject-js
Inject Remote Js For Vue.js
https://github.com/rnkit/vue-inject-js
component vue vuejs2
Last synced: about 1 year ago
JSON representation
Inject Remote Js For Vue.js
- Host: GitHub
- URL: https://github.com/rnkit/vue-inject-js
- Owner: rnkit
- License: mit
- Created: 2017-09-06T16:26:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-06T17:09:02.000Z (almost 9 years ago)
- Last Synced: 2025-03-29T17:02:06.627Z (about 1 year ago)
- Topics: component, vue, vuejs2
- Language: JavaScript
- Size: 53.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vue Inject Js
Inject Remote Js For Vue.js 2.
[](https://www.npmjs.com/package/vue-inject-js)
[](https://www.npmjs.com/package/vue-inject-js)
[](https://www.npmjs.com/package/vue-inject-js)
[]()
[]()
## Installation
Select one option:
1. Install using **npm**
```sh
npm install vue-inject-js --save
```
You can omit the `--save` option if using `npm@^5`.
You can also use Yarn as:
```sh
yarn add vue-inject-js
```
In your JavaScript file:
```js
import VueInjectJs from 'vue-inject-js'
```
\- or -
```js
var VueInjectJs = require('vue-inject-js')
```
2. Embed script tag
```html
```
Then register the component into Vue:
```js
Vue.use(VueInjectJs)
```
## Documentation
Using Inject Js is easy. The HTML code you need is the following:
```html
```
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](CHANGELOG.md) file.
## License
[MIT](http://opensource.org/licenses/MIT)
## Contribution
- [@simamn](mailto:liwei0990@gmail.com) The main author.
## Questions
Feel free to [contact me](mailto:liwei0990@gmail.com) or [create an issue](https://github.com/rnkit/vue-inject-js/issues/new)
> made with ♥