JSFiddle - React, Tailwind, and code Playground

HTML

<body ng-app="app">
<div ng-controller='controller'>
    <h1>{{value}}</h1>
</div>
</body>

JavaScript

$rootScope.$apply();app = angular.module('app',[]);

app.controller('controller', function($scope, $rootScope, $q){
    
    $scope.value = delayed();
    
    function delayed(){
        var deferred = $q.defer();
        setTimeout(function(){
            deferred.resolve('monkey!');
            $rootScope.$apply();
        },500);        
    
        return deferred.promise;
    }
});