Assures that the method is called within the Angular Zone, otherwise throws an error.
()
| 196 | Assures that the method is called within the Angular Zone, otherwise throws an error. |
| 197 | */ |
| 198 | static assertInAngularZone(): void { |
| 199 | if (!NgZone.isInAngularZone()) { |
| 200 | throw new RuntimeError( |
| 201 | RuntimeErrorCode.UNEXPECTED_ZONE_STATE, |
| 202 | ngDevMode && 'Expected to be in Angular Zone, but it is not!', |
| 203 | ); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | Assures that the method is called outside of the Angular Zone, otherwise throws an error. |
no test coverage detected