Skip to content

Instantly share code, notes, and snippets.

@Purecaesar
Created June 27, 2021 08:39
Show Gist options
  • Save Purecaesar/da7cdc65c8e624f5314c94e7280278d6 to your computer and use it in GitHub Desktop.
Save Purecaesar/da7cdc65c8e624f5314c94e7280278d6 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;
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment