Open sergey-ua opened 8 years ago
what do you want to do?will you please show your error type picture?
@sergey-ua Could you place the alertify on the window yourself? I would hate to modify the alertify just to support AMD
@sergey-ua Do you manage to make it work?
Hi,
I want to use ng-alertify in requireJs app, but faced with weird error. So it came up with "Uncaught Error: Missing alertify object". After debug I found that ng-alertify requires angular and alertify instance, if alertify instance is not defined then I get that error.
It expects it to be at window.alertify, but because of these lines:
// AMD and window support if (typeof define === "function") { define([], function () { return new Alertify(); }); } else if (typeof global.alertify === "undefined") { global.alertify = new Alertify(); } it did not set global.alertify property as define function is present in a context and that's why window.alertify is not defined and as a result the exception is thrown.
Thanks,
Sergey