Created
July 7, 2021 08:10
-
-
Save Purecaesar/4cb3728dfeef798e8db30a95c4f248d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function NgResolve(name?: string, propagation = true) { | |
return function( | |
target: any, | |
key: string, | |
originalDescriptor?: TypedPropertyDescriptor<any> | |
): any { | |
const router = StaticInjectorService.Injector.get(Router); | |
const triger = new Subject(); | |
const destroyer = new Subject(); | |
const rootContextMap = (router as any).rootContexts.contexts as Map< | |
string, | |
OutletContext | |
>; | |
let routerData: any; | |
let cdr: ChangeDetectorRef; | |
let inited = false; | |
let compRef: ComponentRef<any>; | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment