Expert
Given the following module and controller:
angular
.module('app', [])
.conroller('appController', function () {
this.greeting = 'hello';
});
And its associated unit test:
describe('app', function () {
beforeEach(module('app'));
describe('appController', function () {
beforeEach(inject(function () {
appController = $controller('appController');
}));
it('should greet us', function () {
expect(appController.greeting).toBe("hello");
});
});
});
What will happen?
Author: Mathieu RobinStatus: PublishedQuestion passed 90 times
Edit
0
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
What is the value of the expression `{{ 1 + 2 }}` in AngularJS?0
What is the output of the following code?
```
var a = 1;
var b = 2;
var c = a + b;
console.log(c);
```0
Add features and data to the $scope