I have a search box and a search button. I need to disable button until user provides the search term, but the button gets disable always. I have following the code:
<input type='text' [(ngModel)]='listFilter' />
<button [disabled]="!listFilter" class="btn btn-primary"(click)='OnSearch(listFilter)'>
Search
</button>
What's wrong here? I'm using angular 4