ngx-clamp
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
52 lines (46 loc) • 2.52 kB
JavaScript
import * as i0 from '@angular/core';
import { EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';
import { clamp } from 'clamp.ts';
class NgxClampDirective {
constructor(contentElementRef) {
this.contentElementRef = contentElementRef;
this.ngxClampOptions = { clamp: 2 };
this.ngxClampResponse = new EventEmitter();
}
ngOnInit() {
const ngxClampResponse = clamp(this.contentElementRef.nativeElement, this.ngxClampOptions);
this.ngxClampResponse.emit(ngxClampResponse);
}
}
NgxClampDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
NgxClampDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: NgxClampDirective, selector: "[ngx-clamp]", inputs: { ngxClampOptions: "ngxClampOptions" }, outputs: { ngxClampResponse: "ngxClampResponse" }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampDirective, decorators: [{
type: Directive,
args: [{
selector: '[ngx-clamp]'
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { ngxClampOptions: [{
type: Input
}], ngxClampResponse: [{
type: Output
}] } });
class NgxClampModule {
}
NgxClampModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgxClampModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampModule, declarations: [NgxClampDirective], exports: [NgxClampDirective] });
NgxClampModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NgxClampModule, decorators: [{
type: NgModule,
args: [{
declarations: [NgxClampDirective],
exports: [NgxClampDirective]
}]
}] });
/*
* Public API Surface of ngx-clamp
*/
/**
* Generated bundle index. Do not edit.
*/
export { NgxClampDirective, NgxClampModule };
//# sourceMappingURL=ngx-clamp.js.map