Sharing Top Content from the Angular-sphere.

angularjs-autogrow – AngularJS 1.x directive for auto-grow / auto-resize of… #npm #javascript #nodejs

  • AngularJS directive for auto-grow / auto-resize of textarea elements on typing.
  • A full explanation of the code can be found on my blog post along with a jQuery plugin and an Angular directive with this technique.
  • Include file in section of the HTML:

    It’s also recommended to add those two CSS properties to make things stable:

    Add the directive to the textarea element:

    You can limit the auto-growing of the textarea element by using attribute:

    You can set the initial line number using attribute:

AngularJS 1.x directive for auto-grow / auto-resize of textarea elements

@npmdaily: angularjs-autogrow – AngularJS 1.x directive for auto-grow / auto-resize of… #npm #javascript #nodejs

AngularJS directive for auto-grow / auto-resize of textarea elements on typing.

Works in all cases: expands on line breaks and word breaks.

Great Performance: minimal DOM manipulation and no watchers.

Allows limitation of auto-growing so a scrollbar will appear after X lines of content.

A full explanation of the code can be found on my blog post along with a jQuery plugin and an Angular directive with this technique.

section of the HTML:

dependency on your angular module:

It’s also recommended to add those two CSS properties to make things stable:

Add the directive to the textarea element:

attribute:

attribute:

angularjs-autogrow

Comments are closed, but trackbacks and pingbacks are open.