Assures that the method is called outside of the Angular Zone, otherwise throws an error.
()
| 208 | Assures that the method is called outside of the Angular Zone, otherwise throws an error. |
| 209 | */ |
| 210 | static assertNotInAngularZone(): void { |
| 211 | if (NgZone.isInAngularZone()) { |
| 212 | throw new RuntimeError( |
| 213 | RuntimeErrorCode.UNEXPECTED_ZONE_STATE, |
| 214 | ngDevMode && 'Expected to not be in Angular Zone, but it is!', |
| 215 | ); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Executes the `fn` function synchronously within the Angular zone and returns value returned by |
no test coverage detected