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 82 times
Edit
-1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about AngularJS
1
Add an entry to the browser history1
What is the output of the following code?
```
var g = $q.defer();
var f = $q.defer();
setTimeout(function(){
g.resolve(1);
}, 1000);
setTimeout(function(){
f.resolve(2);
}, 2000);
console.log(g.then(function(x){
return f.then(function(y){
return x + y;
});
}));
```0
How to get all the values of an array in AngularJS0
What is the value of the variable 'name' in the following code?
```
var name = 'John';
function myFunction() {
console.log(name);
}
```0
What is the value of the expression `promise.then(null, function() {})` if `promise` is rejected with an error?