Vue-js-modal: Install via cdn example.

Created on 24 Jan 2019  路  4Comments  路  Source: euvl/vue-js-modal

Problem:

Hello , is it possible to install this plugin with direct cdn link ?

Example & screenshots:

Tried to use

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
Vue.use(VModal);

#### But VModal is undefined.

Tnx for any answer.

Most helpful comment

Ok, sry for bothering ;)
Got it working, tnx much for neat plugin!

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
Vue.use(window["vue-js-modal"].default);

In template

        <modal name="hello-world">
            hello, world!
        </modal>

In component

        methods: {
            confirmPassengersAndAcceptQuote: function (resort) {
                let thisInCustomVariable = this;
                thisInCustomVariable.$modal.show('hello-world');

(worked in chrome/ff/IE10)

All 4 comments

Hi, after reading other issue and back to docs, used :

Vue.use(window["vue-js-modal"].default);

Which helped but code still fails on

Cannot read property 'show' of undefined

from

this.$modal.show('hello-world');

Ok, sry for bothering ;)
Got it working, tnx much for neat plugin!

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
Vue.use(window["vue-js-modal"].default);

In template

        <modal name="hello-world">
            hello, world!
        </modal>

In component

        methods: {
            confirmPassengersAndAcceptQuote: function (resort) {
                let thisInCustomVariable = this;
                thisInCustomVariable.$modal.show('hello-world');

(worked in chrome/ff/IE10)

screen shot 2019-01-24 at 15 19 29
fyi ^

Hi. I can't seem to get pinpoint where all this documentation is being referenced when working with this plugin using CDN. Where is this file/Readme on Bower that you are referencing above?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vesper8 picture vesper8  路  3Comments

dland512 picture dland512  路  4Comments

Max64 picture Max64  路  4Comments

smholsen picture smholsen  路  4Comments

chris-rowe picture chris-rowe  路  4Comments