Is there a way to hide a div (with the class "card") until the user inputs text into the textfield in an AngularJS application? I believe the solution involves using ng-show
, but I'm unsure of how to implement this functionality. Any assistance would be greatly appreciated.
This is what my code currently looks like:
<input type="text" ng-model="searchBox" class="search1" placeholder="Search...">
<div ng-repeat="item in posts | filter:searchBox" class="card">
<h3 class="w">{{item.storeName}}</h3>
[...]