Never mind, by looking at the source of toastr (end of toastr.js), it makes itself available as module. The service using the toastr needed to change from:
define(['../module'], function (module) {
'use strict';
module.factory('NotifierSvc', ['$log', function ($log) {
return {
info: function (msg) {
toastr.info(msg);
$log.info(msg);
},
warning: function (msg) {
toastr.warning(msg);
$log.warn(msg);
},
error: function (msg) {
toastr.error(msg);
$log.error(msg);
},
success: function (msg) {
toastr.success(msg);
$log.log(msg);
}
}
}]);
});
to this:
define(['../module', 'toastr'], function (module, toastr) {
'use strict';
module.factory('NotifierSvc', ['$log', function ($log) {
return {
info: function (msg) {
toastr.info(msg);
$log.info(msg);
},
warning: function (msg) {
toastr.warning(msg);
$log.warn(msg);
},
error: function (msg) {
toastr.error(msg);
$log.error(msg);
},
success: function (msg) {
toastr.success(msg);
$log.log(msg);
}
}
}]);
});