angularjs - Angular: Remove error message at the beginning, show it until the user search stuff (?) -


I have a small issue that I did in a web app, now, I have the same problem on a mobile app I can not cure it the way I did it with the web.

As you can see, the user logs in and you will first see the banner "did not match any search criteria". / Strong>, and this is what I want to save, that banner should be displayed when the filter does not give anything and not in the beginning when the user has not typed anything in the search box.

Now, check my code here:

  & lt; Ion-content & gt; & Lt ;! - Search Input - & gt; & Lt; Label class = "item" & gt; & Lt; Input type = "search" ng-model = "query" & gt; & Lt; / Labels & gt; & Lt ;! - This is a banner - & gt; & Lt; Div ng-show = "! SportsFilter.length" & gt; & Lt; I square = "icon" & gt; No search criteria match & lt; / I & gt; & Lt; / Div & gt; & Lt ;! - It's what I'm filtering - & gt; & Lt; Div ng-repeat = "sports in sports filter = (sports filter: query)" ng-show = "sports.lags lilabil" & gt; & Lt; / Div & gt; & Lt; / Ion content & gt; Usually, the sports filter on the load sports filter should be undefined  

and

& lt; Div ng-show = "!! gamefilter & gamefilter.length == 0" & gt; & Lt; I square = "icon" & gt; No search criteria match & lt; / I & gt; & Lt; / Div & gt;

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -