AngularJS

Here I would like explain that how to identify no records found in object or array of javascript with angularJS filters. For that we have to find the length of search text in object if not found in object what we are trying to search. Just we need to mention “Filter:searchText as Results“. Here “Results” …

Start reading AngularJS Filter with No Result Found Message If Record is not in Object or Array

<script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js”></script> <script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular-sanitize.js”></script> <link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.css”/> <div ng-app=”app”> <div ng-controller=”ParentCtrl”> <h2 style=”color:brown”>Filter Applied (logical OR)</h2> <input type=”text” class=”search” placeholder=”Ask us anything |” ng-model=”searchText”> <span style=”font-size:10px”>Search terms:’table cloth for'</span> <div data-ng-repeat=”entry in data | myFilter:searchText:’AND’”>{{ entry }}</div> </div></div> <script> angular.module(‘app’, []) .filter(“myFilter”, function () { return function (input, searchText, AND_OR) { var returnArray = [], …

Start reading AngularJs Filter Applied (logical OR)