Question from the AngularJS test

How to change the value of a variable in AngularJS after 1 second?

Hard

Consider the following situation:

<div ng-controller="appController">
   value:{{value}}
</div>
app
  .controller('appController', function($scope){
      $scope.value= 1;
      window. setTimeout(function(){
         $scope.value= 2;
      }, 1000);
   });

What will be displayed in the DOM more than 1000 milliseconds after the page has been loaded?

Author: Mathieu RobinStatus: PublishedQuestion passed 83 times
Edit
-1
Community EvaluationsNo one has reviewed this question yet, be the first!