File tree Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -542,7 +542,10 @@ export class TreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyMana
542
542
}
543
543
544
544
/** Injection token that determines the key manager to use. */
545
- export const TREE_KEY_MANAGER = new InjectionToken < TreeKeyManagerFactory < any > > ( 'tree-key-manager' ) ;
545
+ export const TREE_KEY_MANAGER = new InjectionToken < TreeKeyManagerFactory < any > > ( 'tree-key-manager' , {
546
+ providedIn : 'root' ,
547
+ factory : TREE_KEY_MANAGER_FACTORY ,
548
+ } ) ;
546
549
547
550
/** @docs -private */
548
551
export function TREE_KEY_MANAGER_FACTORY < T extends TreeKeyManagerItem > ( ) : TreeKeyManagerFactory < T > {
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { TREE_KEY_MANAGER_FACTORY_PROVIDER } from '@angular/cdk/a11y' ;
10
9
import { NgModule } from '@angular/core' ;
11
10
import { CdkTreeNodeOutlet } from './outlet' ;
12
11
import { CdkTreeNodePadding } from './padding' ;
@@ -28,6 +27,5 @@ const EXPORTED_DECLARATIONS = [
28
27
@NgModule ( {
29
28
exports : EXPORTED_DECLARATIONS ,
30
29
declarations : EXPORTED_DECLARATIONS ,
31
- providers : [ TREE_KEY_MANAGER_FACTORY_PROVIDER ] ,
32
30
} )
33
31
export class CdkTreeModule { }
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ ng_module(
18
18
),
19
19
assets = [":tree.css" ] + glob (["**/*.html" ]),
20
20
deps = [
21
- "//src/cdk/a11y" ,
22
21
"//src/cdk/collections" ,
23
22
"//src/cdk/tree" ,
24
23
"//src/material/core" ,
Original file line number Diff line number Diff line change 8
8
9
9
import { NgModule } from '@angular/core' ;
10
10
11
- import { TREE_KEY_MANAGER_FACTORY_PROVIDER } from '@angular/cdk/a11y' ;
12
11
import { CdkTreeModule } from '@angular/cdk/tree' ;
13
12
import { MatCommonModule } from '@angular/material/core' ;
14
13
import { MatNestedTreeNode , MatTreeNodeDef , MatTreeNode } from './node' ;
@@ -31,6 +30,5 @@ const MAT_TREE_DIRECTIVES = [
31
30
imports : [ CdkTreeModule , MatCommonModule ] ,
32
31
exports : [ MatCommonModule , MAT_TREE_DIRECTIVES ] ,
33
32
declarations : MAT_TREE_DIRECTIVES ,
34
- providers : [ TREE_KEY_MANAGER_FACTORY_PROVIDER ] ,
35
33
} )
36
34
export class MatTreeModule { }
You can’t perform that action at this time.
0 commit comments