Skip to content

Instantly share code, notes, and snippets.

View kplhub's full-sized avatar

kplhub

  • Norway
View GitHub Profile
@kplhub
kplhub / textarea-autosize.directive.ts
Last active June 19, 2021 07:43
textarea autosize directive for ionic/angular 4 (updated to work with 4.0.0)
import { Directive, ElementRef, OnInit } from '@angular/core';
import { Observable, fromEvent } from 'rxjs';
import { DomController } from '@ionic/angular';
@Directive({
selector: 'ion-textarea[autosize]'
})
export class TextareaAutosizeDirective implements OnInit {