Skip to content

Instantly share code, notes, and snippets.

@Purecaesar
Created July 7, 2021 08:10
Show Gist options
  • Save Purecaesar/4cb3728dfeef798e8db30a95c4f248d0 to your computer and use it in GitHub Desktop.
Save Purecaesar/4cb3728dfeef798e8db30a95c4f248d0 to your computer and use it in GitHub Desktop.
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