Check out a free preview of the full Advanced Elm course

The "SPAs Exercise" Lesson is part of the full, Advanced Elm course featured in this preview video. Here's what you'd learn in this lesson:

This exercise is intended to help students to become familiar with this DSL for going from URLs to Routes.

Preview
Close

Transcript from the "SPAs Exercise" Lesson

[00:00:00]
>> Richard Feldman: Here in our read-me, we see, and we're gonna open the source route.elm and resolve the to-dos there. So this is going to be based on the very first thing that we looked at, which is to say mapping urls to routes. This is a very quick exercise, and it's essentially just to get familiar with this DSL for going from URLs to routes.

[00:00:18]
So we have a couple of these already mapped out, to go from login and logout in profile, to the corresponding route. And the goal is to sort of finish the list off. Is to handle these different scenarios for settings, register, article, which contains a slug, editor and editor with a slug, and to map those to the corresponding route.

[00:00:39]
As a quick hint, article and edit article work similarly to how a profile works.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now