I am trying to get AlertifyJS (v1.9.0) to work in my angular 2 app. I have the following in vendor.ts
import "alertifyjs/build/alertify.min.js";
import "alertifyjs/build/css/alertify.min.css";
with the following call to alertify
openConfirmationDialog(message: string, okCallback: () => any) {
alertify.confirm(message, function (e: any) {
if (e) {
okCallback();
} else {
}
});
}
but keep getting the error
: Cannot find name 'alertify'.
OK folks, I got it working. it was as simple as just putting this line
var alertify = require('alertifyjs');
just immediately after my imports statements
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With