How to use the toastr.error function in toastr

To help you get started, we’ve selected a few toastr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CSCfi / exam / app / frontend / src / review / questions / assessment / questionAssessment.component.ts View on Github external
}).catch(err => {
                    // Roll back
                    answer.essayAnswer.evaluatedScore = answer.essayAnswer.temporaryScore;
                    toast.error(err.data);
                    resolve();
                });
            });
github weseek / growi / src / client / js / util / apiNotification.js View on Github external
export const toastError = (err, header = 'Error', option = toastrOption.error) => {
  const errs = toArrayIfNot(err);

  for (const err of errs) {
    toastr.error(err.message, header, option);
  }
};
github teki-io / teki / client / src / client / app / shared / services / error-handler.ts View on Github external
handle(error:any) {
    if (error.status === 401) {
      this.translate.get('error.pleaseSignIn').subscribe((msg: string) => toastr.error(msg));
      this.auth.logout();
      this.router.navigate(['/Login']);
    }

    if (error.status === 422) {
      let msg:string = _.chain(error.json()).values().first().value();
      toastr.error(msg);
    }
    return Observable.throw('Server error');
  }
}
github weseek / growi / src / client / js / components / PageEditor.js View on Github external
apiErrorHandler(error) {
    toastr.error(error.message, 'Error occured', {
      closeButton: true,
      progressBar: true,
      newestOnTop: false,
      showDuration: '100',
      hideDuration: '100',
      timeOut: '3000',
    });
  }
github CSCfi / exam / app / frontend / src / session / session.service.ts View on Github external
private onLoginFailure(message: any): void {
        this.$location.path('/');
        toastr.error(message);
    }
github CSCfi / exam / app / frontend / src / exam / editor / sections / sectionQuestion.component.ts View on Github external
}).catch(resp => {
                    toast.error(resp.data);
                    deferred.reject();
                });
            return deferred.promise;
github CSCfi / exam / app / frontend / src / calendar / calendar.service.ts View on Github external
}).catch((resp) => {
            toastr.error(resp.data);
            promise.reject(resp);
        });
    }
github CSCfi / exam / app / frontend / src / exam / collaborative / collaborativeExam.service.ts View on Github external
}, err => {
                toast.error(err.data);
                deferred.reject(err);
            });
        return deferred.promise;

toastr

ToastrJS is a JavaScript library for Gnome / Growl type non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.

MIT
Latest version published 7 years ago

Package Health Score

40 / 100
Full package analysis

Popular toastr functions