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: {{}}</h3> <div ng-repeat=”teamname in round.matches | filter:namesearch”> <b>Match Date:</b> {{}} <a ng-href=”#!/15/{{}}/{{teamname.team1.code}}/{{teamname.team2.code}}”>{{}} <strong>V/S</strong> {{}}</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