How to use the angular2-toaster.ToasterConfig function in angular2-toaster

To help you get started, we’ve selected a few angular2-toaster 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 eosrio / simpleos / src / app / dashboard / send / send.component.js View on Github external
SendComponent.prototype.showToast = function (type, title, body) {
        this.config = new angular2_toaster_1.ToasterConfig({
            positionClass: 'toast-top-right',
            timeout: 10000,
            newestOnTop: true,
            tapToDismiss: true,
            preventDuplicates: false,
            animation: 'slideDown',
            limit: 1,
        });
        var toast = {
            type: type,
            title: title,
            body: body,
            timeout: 10000,
            showCloseButton: true,
            bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
        };
github apache / servicecomb-pack / web / src / main / resources / saga-frontend / src / app / @core / utils / util.service.ts View on Github external
info (title: string, body: string, params?: any) {
    this.config = new ToasterConfig({
      positionClass: params && params.position?params.position:this.positions,
      timeout:  params && params.timeout?params.timeout:this.timeout,
      newestOnTop:  params && params.isNewestOnTop?params.isNewestOnTop:this.isNewestOnTop,
      tapToDismiss:  params && params.isHideOnClick?params.isHideOnClick:this.isHideOnClick,
      preventDuplicates:  params && params.isDuplicatesPrevented?params.isDuplicatesPrevented:this.isDuplicatesPrevented,
      animation:  params && params.animationType?params.animationType:this.animationType,
      limit:   params && params.toastsLimit?params.toastsLimit:this.toastsLimit,
    });
    const toast: Toast = {
      type: 'info',
      title: title,
      body: body,
      timeout:  params && params.timeout?params.timeout:this.timeout,
      showCloseButton:  params && params.isCloseButton?params.isCloseButton:this.isCloseButton,
      bodyOutputType: BodyOutputType.TrustedHtml,
    };
github eosrio / simpleos / src / app / dashboard / referendum / referendum.component.ts View on Github external
private showToast(type: string, title: string, body: string) {
		this.config = new ToasterConfig({
			positionClass: 'toast-top-right',
			timeout: 10000,
			newestOnTop: true,
			tapToDismiss: true,
			preventDuplicates: false,
			animation: 'slideDown',
			limit: 1,
		});
		const toast: Toast = {
			type: type,
			title: title,
			body: body,
			timeout: 10000,
			showCloseButton: true,
			bodyOutputType: BodyOutputType.TrustedHtml,
		};
github eosrio / simpleos / src / app / dashboard / dashboard.component.ts View on Github external
private showToast(type: string, title: string, body: string) {
		this.config = new ToasterConfig({
			positionClass: 'toast-top-right',
			timeout: 10000,
			newestOnTop: true,
			tapToDismiss: true,
			preventDuplicates: false,
			animation: 'slideDown',
			limit: 1,
		});
		const toast: Toast = {
			type: type,
			title: title,
			body: body,
			timeout: 10000,
			showCloseButton: true,
			bodyOutputType: BodyOutputType.TrustedHtml,
		};
github eosrio / simpleos / src / app / landing / landing.component.ts View on Github external
private showToast(type: string, title: string, body: string) {
		this.config = new ToasterConfig({
			positionClass: 'toast-top-right',
			timeout: 10000,
			newestOnTop: true,
			tapToDismiss: true,
			preventDuplicates: false,
			animation: 'slideDown',
			limit: 1,
		});
		const toast: Toast = {
			type: type,
			title: title,
			body: body,
			timeout: 10000,
			showCloseButton: true,
			bodyOutputType: BodyOutputType.TrustedHtml,
		};
github eosrio / simpleos / src / app / dashboard / dapp / dapp.component.js View on Github external
DappComponent.prototype.showToast = function (type, title, body) {
        this.config = new angular2_toaster_1.ToasterConfig({
            positionClass: 'toast-top-right',
            timeout: 10000,
            newestOnTop: true,
            tapToDismiss: true,
            preventDuplicates: false,
            animation: 'slideDown',
            limit: 1,
        });
        var toast = {
            type: type,
            title: title,
            body: body,
            timeout: 10000,
            showCloseButton: true,
            bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
        };
github eosrio / simpleos / src / app / dashboard / dapp / dapp.component.ts View on Github external
private showToast(type: string, title: string, body: string) {
		this.config = new ToasterConfig({
			positionClass: 'toast-top-right',
			timeout: 10000,
			newestOnTop: true,
			tapToDismiss: true,
			preventDuplicates: false,
			animation: 'slideDown',
			limit: 1,
		});
		const toast: Toast = {
			type: type,
			title: title,
			body: body,
			timeout: 10000,
			showCloseButton: true,
			bodyOutputType: BodyOutputType.TrustedHtml,
		};
github apache / servicecomb-pack / web / src / main / resources / saga-frontend / src / app / @core / utils / util.service.ts View on Github external
warning (title: string, body: string, params?: any) {
    this.config = new ToasterConfig({
      positionClass: params && params.position?params.position:this.positions,
      timeout:  params && params.timeout?params.timeout:this.timeout,
      newestOnTop:  params && params.isNewestOnTop?params.isNewestOnTop:this.isNewestOnTop,
      tapToDismiss:  params && params.isHideOnClick?params.isHideOnClick:this.isHideOnClick,
      preventDuplicates:  params && params.isDuplicatesPrevented?params.isDuplicatesPrevented:this.isDuplicatesPrevented,
      animation:  params && params.animationType?params.animationType:this.animationType,
      limit:   params && params.toastsLimit?params.toastsLimit:this.toastsLimit,
    });
    const toast: Toast = {
      type: 'warning',
      title: title,
      body: body,
      timeout:  params && params.timeout?params.timeout:this.timeout,
      showCloseButton:  params && params.isCloseButton?params.isCloseButton:this.isCloseButton,
      bodyOutputType: BodyOutputType.TrustedHtml,
    };