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