When you run asynchronous code, you need to let Angular know that something has updated. This makes angular run a $digest cycle, checking if any bindings need updating.
To do this, wrap your assignment in a call to $scope.$apply().
function myComponent($scope){
Promise.resolve().then(_ => {
$scope.$apply(() => {
this.data = 'Hello World';
});
});
}
let myModule = angular.module('myModule', []);
myModule.component('myComponent', {
template: `{{$ctrl.data}}
`,
controller: myComponent
});
Notice that I added $scope not only in the function body, but also as a function parameter.
Read more about $scope.$apply and $scope.digest