Search code examples
angularangular-materialangular6angular-pipe

Contact list with search filter


I want to make contact list with search filter on the top like this

Many people are saying we have to do it by calling web API's, Can't i do it manually by creating some name in an arrays.I have tried this link too

    https://stackoverflow.com/questions/40678206/angular-2-filter-search-list

still no result.There is no components found in material also(https://material.angular.io/components), some site mentioned that we have to use pipes for filter, pipes are very new concept for me.How can i achieve?


Solution

  • You can do something like this:

    https://stackblitz.com/edit/angular-vchhay

    using filter you can use input to achieve this.

    Edited with Pipes:

    https://stackblitz.com/edit/angular-vchhay

    Using pipes is really simple.