Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Conversation

@osmirnov
Copy link

.... ngOptions directive has the same behavior:

angular/angular.js#2365
angular/angular.js#5337

@konrad-garus
Copy link

+1: Looks very straightforward and is an annoying bug/behavior.

Meanwhile a monkey patch for the impatient:

directive('nonEmptyArray', function () {
    return {
        require: 'ngModel',
        link: function (scope, element, attrs, ngModelCtrl) {
            var original = ngModelCtrl.$isEmpty;
            ngModelCtrl.$isEmpty = function (value) {
                return original.call(ngModelCtrl, value) || value.length === 0;
            };
        }
    }
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants