How to use the formiojs.events function in formiojs

To help you get started, we’ve selected a few formiojs 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 formio / angular-formio / dist / modules / auth / auth.service.js View on Github external
console.error('You must provide an AppConfig within your application!');
        }
        this.loginForm = this.appConfig.appUrl + '/' + this.config.login.form;
        this.registerForm = this.appConfig.appUrl + '/' + this.config.register.form;
        this.onLogin = new core_1.EventEmitter();
        this.onLogout = new core_1.EventEmitter();
        this.onRegister = new core_1.EventEmitter();
        this.onUser = new core_1.EventEmitter();
        this.onError = new core_1.EventEmitter();
        this.ready = new Promise(function (resolve, reject) {
            _this.readyResolve = resolve;
            _this.readyReject = reject;
        });
        // Register for the core events.
        Formio.events.on('formio.badToken', function () { return _this.logoutError(); });
        Formio.events.on('formio.sessionExpired', function () { return _this.logoutError(); });
        this.init();
    }
    FormioAuthService.prototype.onLoginSubmit = function (submission) {
github formio / angular-formio / dist / modules / auth / auth.service.js View on Github external
else {
            console.error('You must provide an AppConfig within your application!');
        }
        this.loginForm = this.appConfig.appUrl + '/' + this.config.login.form;
        this.registerForm = this.appConfig.appUrl + '/' + this.config.register.form;
        this.onLogin = new core_1.EventEmitter();
        this.onLogout = new core_1.EventEmitter();
        this.onRegister = new core_1.EventEmitter();
        this.onUser = new core_1.EventEmitter();
        this.onError = new core_1.EventEmitter();
        this.ready = new Promise(function (resolve, reject) {
            _this.readyResolve = resolve;
            _this.readyReject = reject;
        });
        // Register for the core events.
        Formio.events.on('formio.badToken', function () { return _this.logoutError(); });
        Formio.events.on('formio.sessionExpired', function () { return _this.logoutError(); });
        this.init();
    }
    FormioAuthService.prototype.onLoginSubmit = function (submission) {
github formio / angular-formio / src / modules / auth / auth.service.ts View on Github external
this.loginForm = this.appConfig.appUrl + '/' + this.config.login.form;
    this.registerForm = this.appConfig.appUrl + '/' + this.config.register.form;
    this.onLogin = new EventEmitter();
    this.onLogout = new EventEmitter();
    this.onRegister = new EventEmitter();
    this.onUser = new EventEmitter();
    this.onError = new EventEmitter();

    this.ready = new Promise((resolve: any, reject: any) => {
      this.readyResolve = resolve;
      this.readyReject = reject;
    });

    // Register for the core events.
    Formio.events.on('formio.badToken', () => this.logoutError());
    Formio.events.on('formio.sessionExpired', () => this.logoutError());
    this.init();
  }
github formio / angular-formio / src / modules / auth / auth.service.ts View on Github external
this.loginForm = this.appConfig.appUrl + '/' + this.config.login.form;
    this.registerForm = this.appConfig.appUrl + '/' + this.config.register.form;
    this.onLogin = new EventEmitter();
    this.onLogout = new EventEmitter();
    this.onRegister = new EventEmitter();
    this.onUser = new EventEmitter();
    this.onError = new EventEmitter();

    this.ready = new Promise((resolve: any, reject: any) => {
      this.readyResolve = resolve;
      this.readyReject = reject;
    });

    // Register for the core events.
    Formio.events.on('formio.badToken', () => this.logoutError());
    Formio.events.on('formio.sessionExpired', () => this.logoutError());
    this.init();
  }