void assertInAngularZone()

Source

static void assertInAngularZone() {
  if (!NgZoneImpl.isInAngularZone()) {
    throw new Exception("Expected to be in Angular Zone, but it is not!");
  }
}