JSFiddle - React, Tailwind, and code Playground

by Luqman Rom

HTML

<body ng-app="myApp" ng-controller="MainCtrl">
    <div>Search by all
    
        <br />
        <table id="searchObjResults">
            <tr>
                 <th>Search</th>
                <th>Name</th>
                <th>Phone</th>
               
            </tr>
            <tr >
                <td><input ng-model="searchText" /></td>
                <td ng-repeat-start="friendObj in friends  | filter:searchText  | limitTo:1">{{friendObj.name}}</td>
                
                   <td ng-repeat-end="friendObj in friends  | filter:searchText  | limitTo:1">{{friendObj.phone}}</td>
                
            </tr>
            
            
        </table>
    </div>
    <div>
        
    </div>
</body>

JavaScript

angular.module('myApp', []).controller('MainCtrl', ['$http', '$scope', function ($http, $scope) {
    $scope.friends = [{
        name: 'John',
        phone: '555-1276'
    }, {
        name: 'Mary',
        phone: '800-BIG-MARY'
    }, {
        name: 'Mike',
        phone: '555-4321'
    }, {
        name: 'Adam',
        phone: '555-5678'
    }, {
        name: 'Julie',
        phone: '555-8765'
    }, {
        name: 'Juliette',
        phone: '555-5678'
    }];


    $scope.submitForm = function (theData) {
        console.log('FriendObj:' + theData);
    };

}]);