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 |
Simple way for icons inside input | 1,847 Kb |
Text on fire | 1,941 Kb |
Pure AngularJS Tabs | 2,067 Kb |
Bootstrap Menu with Effect | 2,121 Kb |
Simple Jquery Slider | 2,430 Kb |
Side Menu using AngularJS | 1,988 Kb |
Custom scrollbar crossbrowser | 5,348 Kb |
Skill Bar with Jquery | 2,470 Kb |
Multi step form | 5,689 Kb |
Search button expanding input submit | 2,065 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 |
Navcube | Wbarlow | 4,775 Kb |
Caputre Cam with JS | KimmoCommit | 2,795 Kb |
CSS background-size - GSAP | Jonathan | 2,209 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
Scifi-style Interative Form | Aaronchuo | 4,566 Kb |
Import shader in three.js | Khangeldy | 2,636 Kb |
Text Blocks Over Image, Updated | KatieK2 | 3,122 Kb |
Experiment - SCSS SVG Background Image with Variables | See8ch | 3,270 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Arrow Navigation | Hinducows | 1,973 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!