Elastic (autosize) textareas for AngularJS, without jQuery dependency.
Pull request Compare This branch is 73 commits behind monospaced:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
bower.json
elastic.js
index.html

README.md

Angular Elastic

Elastic (autosize) textareas for AngularJS, without jQuery dependency.

See it in action.

Usage

as attribute

<textarea msd-elastic>
  ...
</textarea>

as class

<textarea class="msd-elastic">
  ...
</textarea>

optionally append whitespace to the end of the height calculation (an extra newline improves the apperance when animating)

<textarea msd-elastic="\n">
  ...
</textarea>

<textarea class="msd-elastic: \n;">
  ...
</textarea>

Install

bower install angular-elastic

Include the elastic.js script provided by this component in your app, and add monospaced.elastic to your app’s dependencies.

Support

Modern browsers only—Internet Explorer 6, 7 & 8 retain their default textarea behaviour.

Demo

monospaced.github.io/angular-elastic

Inspiration