angular.d.t.s ng.IModule use of Object instead of {}, added tests

This commit is contained in:
Albert Weinert
2013-04-03 16:05:10 +02:00
parent 50d34ac8db
commit 558d616fd5
2 changed files with 41 additions and 6 deletions

View File

@@ -138,3 +138,36 @@ module HttpAndRegularPromiseTests {
});
}
}
// Test for AngularJS Syntac
module My.Namespace {
}
// IModule Registering Test
var mod = angular.module('tests',[]);
mod.controller('name', function($scope : ng.IScope) {})
mod.controller('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.controller(My.Namespace);
mod.directive('name', function($scope : ng.IScope) {})
mod.directive('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.directive(My.Namespace);
mod.factory('name', function($scope : ng.IScope) {})
mod.factory('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.factory(My.Namespace);
mod.filter('name', function($scope : ng.IScope) {})
mod.filter('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.filter(My.Namespace);
mod.provider('name', function($scope : ng.IScope) {})
mod.provider('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.provider(My.Namespace);
mod.service('name', function($scope : ng.IScope) {})
mod.service('name', ['$scope', <any>function($scope : ng.IScope) {}])
mod.service(My.Namespace);
mod.constant('name', 23);
mod.constant('name', "23");
mod.constant(My.Namespace);
mod.value('name', 23);
mod.value('name', "23");
mod.value(My.Namespace);