From 50d34ac8db29c4db3297ae59198d311999c89420 Mon Sep 17 00:00:00 2001 From: Albert Weinert Date: Wed, 3 Apr 2013 14:44:24 +0300 Subject: [PATCH] angular.d.ts: added some overrides to ng.IModule with angular it is possible to register controllers, directives etc. per convention if you create an object which has the functions defined. So that your module initialization must not know every controller etc. As an example look at https://github.com/DerAlbertCom/SignagePages/blob/develop/src/SignagePages/app/app.ts https://github.com/DerAlbertCom/SignagePages/blob/develop/src/SignagePages/app/LoginController.js https://github.com/DerAlbertCom/SignagePages/blob/develop/src/SignagePages/app/DailyMealsController.ts --- angularjs/angular.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index b8d683c5c..51fe92065 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -83,18 +83,24 @@ module ng { constant(name: string, value: any): IModule; controller(name: string, controllerConstructor: Function): IModule; controller(name: string, inlineAnnotadedConstructor: any[]): IModule; + controller(object : {}): IModule; directive(name: string, directiveFactory: Function): IModule; directive(name: string, inlineAnnotadedFunction: any[]): IModule; + directive(object: {}): IModule; factory(name: string, serviceFactoryFunction: Function): IModule; factory(name: string, inlineAnnotadedFunction: any[]): IModule; + factory(obj: {}): IModule; filter(name: string, filterFactoryFunction: Function): IModule; filter(name: string, inlineAnnotadedFunction: any[]): IModule; + filter(object: {}): IModule; provider(name: string, serviceProviderConstructor: Function): IModule; provider(name: string, inlineAnnotadedConstructor: any[]): IModule; + provider(object: {}): IModule; run(initializationFunction: Function): IModule; run(inlineAnnotadedFunction: any[]): IModule; service(name: string, serviceConstructor: Function): IModule; service(name: string, inlineAnnotadedConstructor: any[]): IModule; + service(object: {}): IModule; value(name: string, value: any): IModule; // Properties