From 7b8b36274298d279dceae3828433f3abe46e34ab Mon Sep 17 00:00:00 2001 From: Boris Prpic Date: Sun, 7 Feb 2016 21:11:51 +0100 Subject: [PATCH 1/5] Updates IComponentOptions for angular 1.5 components As per https://docs.angularjs.org/guide/component components does not support restrict or isolate but they do require --- angularjs/angular.d.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 67b3eb488..26304d7ce 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1710,20 +1710,12 @@ declare module angular { * Define DOM attribute binding to component properties. Component properties are always bound to the component * controller and not to the scope. */ - bindings?: any; + bindings?: Object; /** * Whether transclusion is enabled. Enabled by default. */ transclude?: boolean; - /** - * Whether the new scope is isolated. Isolated by default. - */ - isolate?: boolean; - /** - * String of subset of EACM which restricts the component to specific directive declaration style. If omitted, - * this defaults to 'E'. - */ - restrict?: string; + require? : string | Array; $canActivate?: () => boolean; $routeConfig?: RouteDefinition[]; } @@ -1774,12 +1766,12 @@ declare module angular { name?: string; priority?: number; replace?: boolean; - require?: any; + require? : string | Array; restrict?: string; scope?: any; - template?: any; + template?: string | Function; templateNamespace?: string; - templateUrl?: any; + templateUrl?: string | Function; terminal?: boolean; transclude?: any; } From 119c65b3117150bda202a49549c2cfea25ab4e57 Mon Sep 17 00:00:00 2001 From: Boris Prpic Date: Mon, 8 Feb 2016 00:00:17 +0100 Subject: [PATCH 2/5] Fixed require In component require works different from directive. Now its Object --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 26304d7ce..a8fae4e74 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1715,7 +1715,7 @@ declare module angular { * Whether transclusion is enabled. Enabled by default. */ transclude?: boolean; - require? : string | Array; + require? : {}; $canActivate?: () => boolean; $routeConfig?: RouteDefinition[]; } From f8e2d6025e973a7c4a1b2e12b36dba471a599afe Mon Sep 17 00:00:00 2001 From: Boris Prpic Date: Mon, 8 Feb 2016 00:04:14 +0100 Subject: [PATCH 3/5] Fixes require again --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index a8fae4e74..a591410a2 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1715,7 +1715,7 @@ declare module angular { * Whether transclusion is enabled. Enabled by default. */ transclude?: boolean; - require? : {}; + require? : Object; $canActivate?: () => boolean; $routeConfig?: RouteDefinition[]; } From 7677a9f3aa9755b24ee85853766da8c8e11f7280 Mon Sep 17 00:00:00 2001 From: Boris Prpic Date: Sat, 13 Feb 2016 02:30:12 +0100 Subject: [PATCH 4/5] Update angular.d.ts --- angularjs/angular.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index a591410a2..fda3f9fa0 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1710,7 +1710,7 @@ declare module angular { * Define DOM attribute binding to component properties. Component properties are always bound to the component * controller and not to the scope. */ - bindings?: Object; + bindings?: any; /** * Whether transclusion is enabled. Enabled by default. */ @@ -1766,7 +1766,7 @@ declare module angular { name?: string; priority?: number; replace?: boolean; - require? : string | Array; + require? : any; restrict?: string; scope?: any; template?: string | Function; From 1c4a34873c9e70cce86edd0e61c559e43dfa5f75 Mon Sep 17 00:00:00 2001 From: Boris Prpic Date: Sat, 13 Feb 2016 21:54:57 +0100 Subject: [PATCH 5/5] Component controller can be array angular.module(.....).component("componentName", { controller: ["$rootScope",function($rootScope) { }], template: .... } --- angularjs/angular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index fda3f9fa0..656e62865 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1685,7 +1685,7 @@ declare module angular { * Controller constructor function that should be associated with newly created scope or the name of a registered * controller if passed as a string. Empty function by default. */ - controller?: string | Function; + controller?: any; /** * An identifier name for a reference to the controller. If present, the controller will be published to scope under * the controllerAs name. If not present, this will default to be the same as the component name.