How to use the @angular/core.EventEmitter function in @angular/core

To help you get started, we’ve selected a few @angular/core 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 primefaces / primeng / components / panelmenu / panelmenu.ts View on Github external
handleClick(event, item) {
        if(item.disabled) {
            event.preventDefault();
            return;
        }
        
        item.expanded = !item.expanded;
        
        if(!item.url) {
            event.preventDefault();
        }
                   
        if(item.command) {
            if(!item.eventEmitter) {
                item.eventEmitter = new EventEmitter();
                item.eventEmitter.subscribe(item.command);
            }
            
            item.eventEmitter.emit({
                originalEvent: event,
                item: item
            });
        }
    }
}
github Promact / md2 / collapse / collapse.js View on Github external
function Md2Collapse() {
        this._collapse = true;
        this._collapsing = false;
        this.collapsed = new EventEmitter();
        this.expanded = new EventEmitter();
    }
    Object.defineProperty(Md2Collapse.prototype, "collapse", {
github UXAspects / UXAspects / showcase / list_view / dist / esm5 / hybrid / components / select-table / select-table.component.js View on Github external
function SelectTableNg1Component(elementRef, injector) {
        var _this = _super.call(this, 'selectTable', elementRef, injector) || this;
        _this.selectedChange = new EventEmitter();
        return _this;
    }
    SelectTableNg1Component.decorators = [
github FuelInteractive / fuel-ui / dist / components / DatePicker / DateRangePicker.js View on Github external
function DateRangePicker(changeDetector, renderer) {
        _super.call(this, changeDetector, renderer);
        this.valueChange = new core_2.EventEmitter();
        this._dateTarget = false;
        this.calendarHeight = DetectionUtils_1.MobileDetection.isAny() || window.innerWidth <= 480 || window.outerWidth <= 480 ? "auto" : "300px";
        this.startDateChange = new core_2.EventEmitter();
        this.endDateChange = new core_2.EventEmitter();
    }
    Object.defineProperty(DateRangePicker.prototype, "value", {
github michaelbromley / ngx-pagination / dist / pagination-controls.directive.js View on Github external
function PaginationControlsDirective(service, changeDetectorRef) {
        var _this = this;
        this.service = service;
        this.changeDetectorRef = changeDetectorRef;
        this.maxSize = 7;
        this.pageChange = new core_1.EventEmitter();
        this.pages = [];
        this.changeSub = this.service.change
            .subscribe(function (id) {
            if (_this.id === id) {
                _this.updatePageLinks();
                _this.changeDetectorRef.markForCheck();
                _this.changeDetectorRef.detectChanges();
            }
        });
    }
    PaginationControlsDirective.prototype.ngOnInit = function () {
github FuelInteractive / fuel-ui / dist / components / TimePicker / TimePicker.js View on Github external
this.meridians = ["AM", "PM"];
        this.showSeconds = false;
        this.readonlyInput = false;
        this.showSpinners = true;
        this.disabled = false;
        this.min = new Date(new Date().getFullYear(), 0, 1, 0, 0, 0);
        this.max = new Date(new Date().getFullYear(), 0, 1, 23, 59, 59);
        this.value = new Date(new Date().getFullYear(), 0, 1, 0, 0, 0);
        this.meridian = this.meridians.length > 0 ? this.meridians[0] : null;
        this.hours = 0;
        this.minutes = "00";
        this.seconds = "00";
        this.invalidHours = false;
        this.invalidMinutes = false;
        this.invalidSeconds = false;
        this.valueChange = new core_1.EventEmitter();
    }
    TimePicker.prototype.ngOnInit = function () {
github arkon / ng-sidebar / dist / ng2-sidebar.js View on Github external
function Sidebar() {
        this.open = false;
        this.openChange = new core_1.EventEmitter();
        this.pullRight = false;
        this.closeOnClickOutside = false;
        this.showOverlay = false;
        this.onOpen = new core_1.EventEmitter();
        this.onClose = new core_1.EventEmitter();
        this._onClickOutsideAttached = false;
        this._onClickOutside = this._onClickOutside.bind(this);
    }
    Sidebar.prototype.ngOnInit = function () {
github swimlane / ngx-charts / release / number-card / card-series.component.js View on Github external
function CardSeriesComponent() {
        this.innerPadding = 15;
        this.emptyColor = 'rgba(0, 0, 0, 0)';
        this.animations = true;
        this.select = new EventEmitter();
    }
    CardSeriesComponent.prototype.ngOnChanges = function (changes) {
github ag-grid / ag-grid-angular / dist / agGridNg2.js View on Github external
this.cellEditingStopped = new core_1.EventEmitter();
        this.bodyScroll = new core_1.EventEmitter();
        this.animationQueueEmpty = new core_1.EventEmitter();
        this.heightScaleChanged = new core_1.EventEmitter();
        this.paginationChanged = new core_1.EventEmitter();
        this.componentStateChanged = new core_1.EventEmitter();
        this.bodyHeightChanged = new core_1.EventEmitter();
        this.displayedColumnsWidthChanged = new core_1.EventEmitter();
        this.scrollVisibilityChanged = new core_1.EventEmitter();
        this.columnHoverChanged = new core_1.EventEmitter();
        this.flashCells = new core_1.EventEmitter();
        this.viewportImpacted = new core_1.EventEmitter();
        this.rowDragEnter = new core_1.EventEmitter();
        this.rowDragMove = new core_1.EventEmitter();
        this.rowDragLeave = new core_1.EventEmitter();
        this.rowDragEnd = new core_1.EventEmitter();
        this.pasteStart = new core_1.EventEmitter();
        this.pasteEnd = new core_1.EventEmitter();
        this.columnRowGroupChangeRequest = new core_1.EventEmitter();
        this.columnPivotChangeRequest = new core_1.EventEmitter();
        this.columnValueChangeRequest = new core_1.EventEmitter();
        this.columnAggFuncChangeRequest = new core_1.EventEmitter();
        this._nativeElement = elementDef.nativeElement;
        this.ng2FrameworkFactory.setViewContainerRef(this.viewContainerRef);
        this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef);
        this.frameworkComponentWrapper.setComponentFactoryResolver(this._componentFactoryResolver);
    }
    AgGridNg2.prototype.ngAfterViewInit = function () {
github contiv / auth_proxy / app / components / directives / tabledirective.ts View on Github external
constructor(){
        this.sortdata = new EventEmitter();
        this.sortfield = '';
        this.sortobject = {field: '', iconDirection: {down: true, up: false}, reverse: false};
    }