( rootComponent: Type<any> | null, injector: EnvironmentInjector, )
| 96 | } |
| 97 | |
| 98 | export function createEmptyStateSnapshot( |
| 99 | rootComponent: Type<any> | null, |
| 100 | injector: EnvironmentInjector, |
| 101 | ): RouterStateSnapshot { |
| 102 | const emptyParams = {}; |
| 103 | const emptyData = {}; |
| 104 | const emptyQueryParams = {}; |
| 105 | const fragment = ''; |
| 106 | const activated = new ActivatedRouteSnapshot( |
| 107 | [], |
| 108 | emptyParams, |
| 109 | emptyQueryParams, |
| 110 | fragment, |
| 111 | emptyData, |
| 112 | PRIMARY_OUTLET, |
| 113 | rootComponent, |
| 114 | null, |
| 115 | {}, |
| 116 | injector, |
| 117 | ); |
| 118 | return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, [])); |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Provides access to information about a route associated with a component |
no outgoing calls
no test coverage detected