UNPKG

@asi-ngtools/lib

Version:

This project is a little components library, simple to use, which will help you to simplify your project.

41 lines (40 loc) 2.15 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import { Directive, Input, ElementRef } from '@angular/core'; var FocusDirective = /** @class */ (function () { function FocusDirective(element) { this.element = element; } /** * @return {?} */ FocusDirective.prototype.ngAfterViewInit = /** * @return {?} */ function () { this.element.nativeElement.focus(); }; FocusDirective.decorators = [ { type: Directive, args: [{ selector: '[focus]' },] } ]; /** @nocollapse */ FocusDirective.ctorParameters = function () { return [ { type: ElementRef } ]; }; FocusDirective.propDecorators = { focus: [{ type: Input }] }; return FocusDirective; }()); export { FocusDirective }; if (false) { /** @type {?} */ FocusDirective.prototype.focus; /** @type {?} */ FocusDirective.prototype.element; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFzaS1uZ3Rvb2xzL2xpYi8iLCJzb3VyY2VzIjpbImxpYi9kaXJlY3RpdmVzL2ZvY3VzLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7SUFTMUUsd0JBQW9CLE9BQW1CO1FBQW5CLFlBQU8sR0FBUCxPQUFPLENBQVk7S0FBSzs7OztJQUU1Qyx3Q0FBZTs7O0lBQWY7UUFDRSxJQUFJLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxLQUFLLEVBQUUsQ0FBQztLQUNwQzs7Z0JBWEYsU0FBUyxTQUFDO29CQUNULFFBQVEsRUFBRSxTQUFTO2lCQUNwQjs7OztnQkFKMEIsVUFBVTs7O3dCQU9sQyxLQUFLOzt5QkFQUjs7U0FLYSxjQUFjIiwic291cmNlc0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