Search Posts

Category: angularjs-ng-show

Hide parent block when child element is not present while searching in searchbox

How do I hide the parent element when a child element is not present while searching in the search box. Here is my code: <div class=”col-md-6″ ng-repeat=”round in displaymatch.allrounds> <h3>Round: {{round.name}}</h3> <div ng-repeat=”teamname in round.matches | filter:namesearch”> <b>Match Date:</b> {{teamname.date}} <a ng-href=”#!/15/{{teamname.date}}/{{teamname.team1.code}}/{{teamname.team2.code}}”>{{teamname.team1.name}} <strong>V/S</strong> {{teamname.team2.name}}</a> </div> Normal searching of element is working but searching for the keywords which are not present should hide the main blocks(Rounds) also. Normal functionality: Here is where I’m facing the issue: […]

Performance about ng-show vs. ng-hide

Introduction:- Some people are only using ng-show instead of ng-hide=”!true” Or some peoples are using ng-hide instead of ng-show=”!true”. Technically we don’t need ng-hide directive. But! I know angular introduced ng-hide for standard coding structure. And please understand me, I am asking about the performance not difference. My Question:- So my question is what about the performance of this following scenarios? ng-hide=”true” vs. ng-show =”!true” ng-show=”true” vs. ng-hide=”!true”; Source: AngularJS