angular-croppie-module
Version:
Angular 2+ module for using [Croppie](https://foliotek.github.io/Croppie/).
63 lines (58 loc) • 2.21 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('croppie'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('angular-croppie-module', ['exports', '@angular/core', 'croppie', '@angular/common'], factory) :
(factory((global['angular-croppie-module'] = {}),global.ng.core,global.Croppie,global.ng.common));
}(this, (function (exports,core,Croppie,common) { 'use strict';
var CroppieDirective = /** @class */ (function () {
function CroppieDirective(elementRef) {
this.element = elementRef.nativeElement;
this.update = new core.EventEmitter();
}
CroppieDirective.prototype.ngAfterViewInit = function () {
var _this = this;
((this.croppieOptions)).update = function (data) { return _this.update.emit(data); };
this.croppie = new Croppie(this.element, this.croppieOptions);
};
CroppieDirective.prototype.ngOnDestroy = function () {
if (!!this.croppie) {
this.croppie.destroy();
}
};
return CroppieDirective;
}());
CroppieDirective.decorators = [
{ type: core.Directive, args: [{
selector: 'img[croppieOptions]',
exportAs: 'croppie'
},] },
];
CroppieDirective.ctorParameters = function () { return [
{ type: core.ElementRef, },
]; };
CroppieDirective.propDecorators = {
"croppieOptions": [{ type: core.Input },],
"update": [{ type: core.Output },],
};
var CroppieModule = /** @class */ (function () {
function CroppieModule() {
}
return CroppieModule;
}());
CroppieModule.decorators = [
{ type: core.NgModule, args: [{
imports: [
common.CommonModule
],
declarations: [
CroppieDirective
],
exports: [
CroppieDirective
]
},] },
];
exports.CroppieDirective = CroppieDirective;
exports.CroppieModule = CroppieModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=angular-croppie-module.umd.js.map