ng-show doesn't display element when element has "filter" applied to an array. #15804
Description
Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In 1.6.2, ng-show is ignored when the same element has an ng-bind that contains a filter on an array.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
https://jsfiddle.net/r8o95zcf/
What is the expected behavior?
When user types a search query in the box, the form should be come "dirty" and the span element with ng-show should display the found array element due to the filter applied. As it currently stands, the span tag remains hidden even though the filter is working correctly.
That is to say, placing a filter inside an ng-bind with an array should not affect the behavior of ng-show.
What is the motivation / use case for changing the behavior?
Not using ng-show means that the initially all elements of the array will be displayed. In some use cases, it makes sense to hide the available array elements until the user has attempted to interact with the form (making it dirty).
Which versions of AngularJS, and which browser / OS are affected by this issue? Did this work in previous versions of AngularJS? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Latest version of Chrome and Firefox 51.0.1. Tested with angular 1.6.2 and https://code.angularjs.org/snapshot/angular.js behavior is the same.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Don't know.