From 58b6a544df7512e57482a22e034431c57e77c2f7 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Wed, 14 Dec 2016 22:10:13 +0100 Subject: [PATCH 1/2] fix(a11y): add all providers to forRoot Adds all of the necessary providers to the `A11yModule`. Fixes #2189. --- src/lib/core/a11y/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/a11y/index.ts b/src/lib/core/a11y/index.ts index 4c1955615510..c7a1c6e8c1ce 100644 --- a/src/lib/core/a11y/index.ts +++ b/src/lib/core/a11y/index.ts @@ -16,7 +16,7 @@ export class A11yModule { static forRoot(): ModuleWithProviders { return { ngModule: A11yModule, - providers: A11Y_PROVIDERS, + providers: PlatformModule.forRoot().providers.concat(A11Y_PROVIDERS), }; } } From 95ef6192f30dce97a786d043158207f91ce0a532 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Wed, 14 Dec 2016 22:17:05 +0100 Subject: [PATCH 2/2] Remove redundant concat. --- src/lib/core/a11y/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/core/a11y/index.ts b/src/lib/core/a11y/index.ts index c7a1c6e8c1ce..ff1d094c69e5 100644 --- a/src/lib/core/a11y/index.ts +++ b/src/lib/core/a11y/index.ts @@ -16,7 +16,10 @@ export class A11yModule { static forRoot(): ModuleWithProviders { return { ngModule: A11yModule, - providers: PlatformModule.forRoot().providers.concat(A11Y_PROVIDERS), + providers: [ + PlatformModule.forRoot().providers, + A11Y_PROVIDERS, + ], }; } }