Load External js with Meteor

Asked

Viewed 29 times

1

Gentlemen, I’m new to Multimedia,...in my project I use bootbox.js to open a more beautiful prompt, how do I reference this file in Content ? I have others too

Thank you very much from now on

1 answer

0

in a project newly created for this test ...

meteor create --bare teste
meteor npm install --save jquery bootstrap bootbox

in /client/main.html

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

in /client/main.js

import 'bootstrap/dist/css/bootstrap.min.css';
window.$ = jQuery = require('jquery');
$(document).ready(() => {
  require('bootstrap');
  window.bootbox = require('bootbox');
  bootbox.alert("This is the default alert!");
});

open the browser console and test the other examples of the bootboxjs.com site

Browser other questions tagged

You are not signed in. Login or sign up in order to post.