Exercise: In memory counter


  1. Create an application that has a button called 'Increment' and shows a number.
  2. Every time the button is clicked the number increases by 1.
  3. Implement it in a single HTML file without a 'script' tag.
  4. Add another button called 'Decrement'.
  5. When the user clicks that button the counter is decremented.
  6. Still have this in a single HTML file without a 'script' tag.
  7. Change the application now moving everything to a controller.
  8. Both the initialization and the code of increment and decrement.
  9. Disallow negative numbers: If the user clicks on 'decrement' while the counter
  10. is at 0, display a message in a 'div' element that this operation is not allowed.