JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller="Main">
<input ng-model="input" ng-change="lookup()"/>
</div>
JavaScript
var app = angular.module('app', []);
app.controller('Main', function ($scope) {
var delay;
var lookup = function() {
console.log($scope.input);
};
$scope.lookup = function() {
clearTimeout(delay);
delay = setTimeout(lookup, 1000);
};
});