I try to use alertify.js in my project .So I followed this material https://signl.uk/tutorial/index/notify-service-with-angular-5. But I got a error ReferenceError: alertify is not defined when click button in my application.
alertifyjs css and js files I add into angular.json file.
alertify.service.ts
Help me for identify my mistake.
Edit
I import AlertifyService in component.ts file as private alertify: AlertifyService and In app module import { AlertifyService } from './services/alertify.service'; and added AlertifyService in provider as providers: [AlertifyService]
I use alertify in my login component
login.component.ts
login(){
let email = this.loginForm.get("email").value;
let password = this.loginForm.get("password").value;
this.loading = true;
this.authService.login(email, password).subscribe(response => {
this.alertify.success('Successfully Login');
this.loading = false;
// Save data to sessionStorage
localStorage.setItem('isLoggedIn', "true");
localStorage.setItem('currentUserID', response.user.uid);
this.router.navigate(['/dashboard'])
}, error => {
this.loading = false;
});
}


import * as alertify;ng serveafter adding the script toangular.json?alertify.min.jsexists on the given path?