/** * Base class for component controllers. */ export default class Component { /** * The element window. */ get window() { return this.document.defaultView; } /** * Contructor. * * @param {HTMLElement} $element The main component element */ constructor($element) { this.element = $element[0]; this.element.$ctrl = this; this.document = $element[0].ownerDocument; } } Component.$inject = ['$element'];