void assertNotInAngularZone()

Source

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