angular-elastic icon indicating copy to clipboard operation
angular-elastic copied to clipboard

make ngmodel dependency optional?

Open electronicott opened this issue 9 years ago • 4 comments

i am working on a project where the text areas are not data bound to a model, but i would still like to use elastic to resize them.

would it be possible to change the ngModel requirement to ?ngModel and thus removing the scope watcher, if not specified?

thank you

electronicott avatar Feb 11 '16 09:02 electronicott

Angular docs state that ng-model is a required attribute of an angular textarea:

https://docs.angularjs.org/api/ng/directive/textarea

So angular elastic also requires this attribute.

monospaced avatar Feb 17 '16 10:02 monospaced

thanks for your reply, but i think that's a problem with the angular docs, as their code on github states: https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js:1676

var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
    function($browser, $sniffer, $filter, $parse) {
  return {
    restrict: 'E',
    require: ['?ngModel'],

electronicott avatar Feb 17 '16 10:02 electronicott

I get a 404 on that link.

monospaced avatar Feb 17 '16 11:02 monospaced

ah sorry, forgot the url... try again now

electronicott avatar Feb 17 '16 12:02 electronicott

Archiving repository.

monospaced avatar Sep 21 '22 12:09 monospaced