Question: Angular Task Let's write a little component, orderedlist, which implements an alphabetically sorted list. The component will include a button to enable the user to
Angular
Task
Let's write a little component, orderedlist, which implements an alphabetically sorted list. The component will include a button to enable the user to sort either in ascending or descending order and a second button to permit the list to be cleared.
Your component should render specific elements for the testing suite to hook onto. The test suite will evaluate that the elements behave according to the following specifications:
An element which the user can use to add items to the list. This button should listen for Enter keydown events to add the current contents to the list (if nonempty). After adding an item, the input box should be cleared.
A
A
A
- element, which should contain a series of
- elements that represent the sorted list contents.
You can assume all input typed into the box consists only of lowercase alphabetical characters for the purposes of this challenge.
There is no predetermined correct answer for style and CSS. Your solution need not look like the demo below but it should demonstrate understanding of basic CSS and user experience principles.
Demo
Here's a screen capture showing the component in action. Note the icon (button text) changes for up/down sorting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
