Registers an input with the timepicker.
(input: MatTimepickerConnectedInput<D>)
| 297 | |
| 298 | /** Registers an input with the timepicker. */ |
| 299 | registerInput(input: MatTimepickerConnectedInput<D>): void { |
| 300 | const currentInput = this._input(); |
| 301 | |
| 302 | if (currentInput && input !== currentInput && (typeof ngDevMode === 'undefined' || ngDevMode)) { |
| 303 | throw new Error('MatTimepicker can only be registered with one input at a time'); |
| 304 | } |
| 305 | |
| 306 | this._input.set(input); |
| 307 | } |
| 308 | |
| 309 | ngOnDestroy(): void { |
| 310 | this._keyManager.destroy(); |