装饰器

@ZoneOutside

装饰方法运行在 runOutsideAngular 内。

class MockClass {
  constructor(public ngZone: NgZone) {}

  @ZoneOutside()
  run(): void {}
}

@ZoneRun

装饰方法运行在 run 内。

class MockClass {
  constructor(public ngZone: NgZone) {}

  @ZoneRun()
  run(): void {}
}
Loading...