AngularJS tutorial || AngularJs instant search with example

AngularJs tutorial, Instant search in angularJS. AngualarJs is an open source framework for javascript. developed by Google team. Let’s see the angularJs instant search example with source code.

I am going to use Eclipse as an IDE for this tutorial and we need a server for run our application like tomcat or any other you want you can use.

AngularJS tutorial || instant search in AngularJs with the example.

index.html

<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>

<script src="js/index.js"></script>
</head>
<body ng-app="MyApp" ng-controller="MyCtrl">

<input type="text" placeholder="enter search text" ng-model="mySearch">

<p ng-repeat="user in users | filter:mySearch" >
{{user.name}}
</p>
</body>
</html>

index.js

var app = angular.module('MyApp',[]);
app.controller('MyCtrl',function($scope){
    
var users = [{name :"jhon"},

{name :"xyz"},

{name :"asd"},

{name :"jhon"},

{name :"asd"},

{name :"xyz"}];

$scope.users = users; }
);

AngularJs instant search example with source code.

AngularJs tutorial with MySQL