I'm trying to bring toastr into my application. I've done something very simple:
bundles.Add(new ScriptBundle("~/Content/example-scripts").Include(
"~/Areas/Examples/Scripts/vendor/*.js"
));
Where that folder contains toastr.js. And then in my view:
@Scripts.Render("~/Content/example-scripts")
I see toastr getting loaded in Chrome, yet when I call toastr from my viewmodel:
$(document).ready(function () {
toastr.success('sup');
ko.applyBindings(new ViewModel());
});
I get the following errors:
Uncaught Error: Mismatched anonymous define() module: function ($) {
return (function () {
var version = '2.0.1';
var $container;
var listener;
var toastId = 0;
var toastType = {
error: 'error',
info: 'info',
success: '...<omitted>...ch require.js:166
Uncaught ReferenceError: toastr is not defined sampleVm.js:36
What am I doing wrong?