When we work with filters, we don't export them as classes but rather as functions. In this case, the list of stores is passed down to the function along with the string from the input box. Actually, the list of stores is even sorted by name since we applied the orderBy filter first.

We go through all the stores and return a list with the stores that have a name that contains the string we're searching for.

Finally we register the filter with the mallApp module.

Include the scripts in index.html

As with all other components, the html page won't know anything about the filter unless we include the scripts so let's do that.