Using Links Instead of Buttons
Let’s discuss how to change the buttons to links to improve user experience in an Ember application.
We'll cover the following
We can improve the user experience by making the buttons link to the route with the appropriate sorting option. Since the sorting options and search term are now embedded in the URL, changing the sorting option is the same as transitioning to the same route with the sort query parameter changed.
Changing buttons to links
In order to do this, only the template needs to change:
The removed code is commented, and the added code is highlighted.
Get hands-on with 1200+ tech skills courses.