JSFiddle - React, Tailwind, and code Playground

by Varun Nuthalapati

HTML

<div ng-controller="MyCtrl">
    <div><input type="text" ng-model="nameFilter" placeholder="Search..." /></div>
    <p ng-repeat="contact in contacts | orderBy: 'customer.name'| unique:'customer.name'">{{ contact.customer.name }}</p>
    
    
</div>

JavaScript

var myApp = angular.module('myApp',[]);

function MyCtrl($scope) {
    $scope.nameFilter = '';
    $scope.contacts = [
        { id:1, customer: { name: 'foo', id: 10 } },
        { id:2, customer: { name: 'bar', id: 20 } },
        { id:3, customer: { name: 'foo', id: 10 } },
        { id:4, customer: { name: 'bar', id: 20 } },
        { id:5, customer: { name: 'baz', id: 30 } },
        { id:5, customer: { name: 'tar', id: 30 } },
        { id:5, customer: { name: 'got', id: 30 } },
        { id:5, customer: { name: 'man', id: 30 } },
        { id:5, customer: { name: 'baz', id: 30 } },
    ];
    
}