JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="testApp">
  <div ng-controller="testController">
    <input id="test" type="text" value="{{test}}" ng-model="test"/>
  </div>
</div>

JavaScript

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

app.controller('testController', function($scope) {
	$scope.test;
  var myInt = setInterval(function() {
  	if (document.getElementById('test').value !== '') {
    	$scope.test = document.getElementById('test').value;
    	$scope.$apply();
      clearInterval(myInt);
      alert($scope.test);
    }
  }, 150);
  
});
setTimeout(function() {
  var input = document.getElementById('test')
	input.value="it works!";
},200);