Try using this
Create a ref with #inputRef (any name you prefer) in the input and pass that value in searchDirective (both are in same HTML) inputRef.value as input has a value property
HTML :
<input type="text" placeholder='Type here' #inputRef /> **The textbox to get the user's input value and #inputRef will help in accessing value in template**
<searchDirective [searchText]='inputRef.value'></searchDirective>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…