Adding Real Features

Let's add some real features to our app!

If you’ve looked at the schedule page in your browser, you’ll see a button next to each day in the schedule labeled “Hide.” Clicking on it does nothing—yet.

Toggling the state with TypeScript

If you’ve looked at the markup for that page in app/views/schedule/show.html.erb, you’ll see an each loop for each day in the schedule. A few lines into that loop, you’ll see a button with the “Hide” text. I’ve marked up the appropriate DOM elements with some CSS classes that we’ll use in the TypeScript code:

Get hands-on with 1400+ tech skills courses.