Skip to content

Instantly share code, notes, and snippets.

View Jamiek94's full-sized avatar

Jamie Jamiek94

  • None
  • The Netherlands
View GitHub Profile
@maxt3r
maxt3r / autoresize.ts
Created November 28, 2016 17:39
Ionic 2 ion-textarea autoresize
// An autoresize directive that works with ion-textarea in Ionic 2
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea>
// Based on https://www.npmjs.com/package/angular2-autosize
import { Directive, HostListener, ElementRef } from "@angular/core";
@Directive({
selector: "ion-textarea[autoresize]" // Attribute selector
})
export class Autoresize {