(minLength: number, validationTrigger: Subject<void>)
| 1810 | } |
| 1811 | |
| 1812 | function asyncValidator(minLength: number, validationTrigger: Subject<void>): AsyncValidatorFn { |
| 1813 | return (control: AbstractControl): Observable<ValidationErrors | null> => { |
| 1814 | return validationTrigger.pipe( |
| 1815 | map(() => |
| 1816 | control.value && control.value.length >= minLength ? null : {asyncValidation: {}}, |
| 1817 | ), |
| 1818 | take(1), |
| 1819 | ); |
| 1820 | }; |
| 1821 | } |
| 1822 | |
| 1823 | function createComponent<T>( |
| 1824 | component: Type<T>, |
no outgoing calls
no test coverage detected