Simple search using AngularJS
How do I make an simple search using angularjs?
Ng-repeat+ng-model, i've updated with a single letter search, only the first names will be displayed.. What is a simple search using angularjs? How do you make a simple search using angularjs? This script and codes were developed by Hélio Marcondes on 09 November 2022, Wednesday.
Simple search using AngularJS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple search using AngularJS</title>
</head>
<body> <body ng-app>
<div ng-controller="List"> <ul> <li ng-repeat="name in names | filter: filterSearch">{{name}}</li> </ul>
</div> <div> <input type="search" ng-model="search"> </div>
</body> <script src='http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple search using AngularJS - Script Codes JS Codes
var List = function($scope){ $scope.names=["Tax", "Tom", "Ralf", "Jerry", "Snow", "Carl"]; function excluirRegex(string){ //Exclude this pattern from search return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g);
} $scope.filterSearch = function(name) { if (!$scope.search){ return true; }else var regex = new RegExp('\\b' + excluirRegex($scope.search), 'i'); return regex.test(name.split(' ')[0]); }; }
Developer | Hélio Marcondes |
Username | haykou |
Uploaded | November 09, 2022 |
Rating | 3 |
Size | 1,802 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Upload image with preview | 2,014 Kb |
Custom scrollbar crossbrowser | 5,348 Kb |
Skill Bar with Jquery | 2,470 Kb |
Flip CSS Animation with Logo | 1,797 Kb |
Side Menu using AngularJS | 1,988 Kb |
Text on fire | 1,941 Kb |
Bootstrap Menu with Effect | 2,121 Kb |
Sticky Header using Jquery | 2,024 Kb |
Pure AngularJS Tabs | 2,067 Kb |
Simple Jquery Slider | 2,430 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Sticky div | Kaslab | 2,225 Kb |
Wikipedia Viewer | Thomasvaeth | 2,549 Kb |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
Sitemap generator for Sharepoint | Gyusza | 2,518 Kb |
Product item | Mymahesh11 | 2,256 Kb |
Portfolio Landing Page | FDfranklin | 3,585 Kb |
A Pen by Kenny Mark | Kennymark | 5,574 Kb |
Banner Ad | Raquellorenzana | 4,172 Kb |
JavaScript Animation | Rcmeisty | 4,581 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!