Add genericised forEach and indexer for FormController

This commit is contained in:
John Reilly
2014-07-29 11:08:28 +01:00
parent 85bc00eebb
commit 22894235a2
2 changed files with 50 additions and 4 deletions
+9
View File
@@ -251,6 +251,15 @@ httpFoo.then((x) => {
});
function test_angular_forEach() {
var values: { [key: string]: string } = { name: 'misko', gender: 'male' };
var log = [];
angular.forEach(values, function (value, key) {
this.push(key + ': ' + value);
}, log);
//expect(log).toEqual(['name: misko', 'gender: male']);
}
// angular.element() tests
var element = angular.element("div.myApp");
var scope: ng.IScope = element.scope();