Example #1
0
                    .then((template) => {
                        const { controller, controllerAs } = ModalManager._getController(options);
                        const changeCounter = () => {
                            this._counter--;

                            if (options.id) {
                                // analytics.push('Modal', `Modal.Close.${WavesApp.type}`, options.id);
                            }
                        };

                        target.controller = controller;
                        target.controllerAs = controllerAs;
                        target.template = template;

                        this._counter++;
                        const modal = $mdDialog.show(target);

                        if (options.id) {
                            // analytics.push('Modal', `Modal.Open.${WavesApp.type}`, options.id);
                        }

                        modal.then(changeCounter, changeCounter);

                        this.openModal.dispatch(modal);
                        return modal;
                    });
 /**
  * @param {string} path
  * @private
  */
 _onChangeConfig(path) {
     if (!path.includes('PERMISSIONS')) {
         return null;
     }
     const permissions = configService.get('PERMISSIONS') || Object.create(null);
     this._permissions = PermissionManager._parsePermissions(permissions);
     this.change.dispatch();
 }
Example #3
0
                this.observe('id', () => {
                    const id = this.id;

                    if (!id) {
                        throw new Error('Tab without id!');
                    }

                    this.changeId.dispatch(this);
                });
 /**
  * @private
  */
 _dispatch() {
     this.changeSignal.dispatch(this.getActiveNotificationsList());
 }