()
| 195 | } |
| 196 | |
| 197 | override ngOnDestroy(): void { |
| 198 | super.ngOnDestroy(); |
| 199 | |
| 200 | if (this.selected) { |
| 201 | // We have to delay this until the next tick in order |
| 202 | // to avoid changed after checked errors. |
| 203 | Promise.resolve().then(() => { |
| 204 | this.selected = false; |
| 205 | }); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | /** Toggles the selection state of the option. */ |
| 210 | toggle(): void { |