import ngModule from '../../module'; import './style.scss'; /** * Floating box displaying debugging information. * Enabled only in development environment. */ export default class Controller { constructor($element, $) { this.env = process.env.NODE_ENV || 'development'; if (this.env == 'development') this.interval = setInterval(() => $.$digest(), 2000); else $element[0].style.display = 'none'; } $onDestroy() { clearInterval(this.interval); } } Controller.$inject = ['$element', '$scope']; ngModule.component('vnDebugInfo', { template: require('./index.html'), controller: Controller });