tommueller / ng-mat-search-bar

An Angular 2+ component for an expandable search-icon.
MIT License
37 stars 9 forks source link

2 way binding #3

Closed rohanshenoy96 closed 5 years ago

rohanshenoy96 commented 5 years ago

How to bind to a variable. I tried [(ngModel)], But it's not working. Does this component not provide this facility. If not it should as it is the basic requirement of a search bar. Also is there another way to access the text directly.

tommueller commented 5 years ago

for now you only have the events as stated on the page to work with the searchbars values. I am more then happy if you contribute [(ngModel)] support with a PR, otherwise I will see if I can get it in within the next days. Thanks for your feedback!

rohanshenoy96 commented 5 years ago

Thank you @tommueller for such a quick reply. I'll definitely give it a try.

tommueller commented 5 years ago

@rohanshenoy96 I just added support for ngModel https://github.com/tommueller/ng-mat-search-bar/commit/2259338cb96bca49970248fef8d0b21e5f0d67a9

I released v2.0.0 containing the changes already!

Cheers, Tom