I am developing a meteor app.
Added the following code
Meteor.startup(function(){
$.when(
$.getScript( "lib/formvalidation/dist/js/formValidation.min.js" ),
$.getScript( "lib/formvalidation/dist/js/framework/bootstrap.min.js"),
$.Deferred(function( deferred ){
$( deferred.resolve );
})
).done(function(){
console.log( "Load was performed." );
});
});
When the application loads, I see the error message:
Uncaught ReferenceError: FormValidation is not defined
Any suggestions?
Try moving formValidation.min.js
and bootstrap.min.js
to the client/compatibility
directory. You won't need startup.js
at all, since files in the client/
directory are automatically loaded client-side.
client/compatibility
is used for scripts that declare a global variable.