ionic based search page using directives to make search input and list reusable