mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
9 lines
271 B
TypeScript
9 lines
271 B
TypeScript
export const runOutsideAngular = (f: () => any) => {
|
|
const w = window as any;
|
|
if (!w.Zone || w.Zone.current._name !== 'angular') {
|
|
return;
|
|
}
|
|
w.Zone.current._parent.run(f);
|
|
};
|
|
|
|
export const componentMetadata = (instance: any) => instance.constructor['ɵcmp'];
|