Angular Barbershop — Angular

Build a village barber's Angular queue screen: components, bindings, forms, slots and styles. 16 levels, played right in the browser with nothing to install.

What the levels ask

  1. Mr. Asep runs Pangkas Rambut Asgar on the road down to the market, and every Saturday his waiting bench is full. He is building a queue screen in Angular. His first component, KartuAntre, is written, and App places it with the <kartu-antre /> tag. But the screen is empty. Fill in the component's selector so the card shows.
  2. The queue card shows up. Now it has to name who is first in line. The names are in antre, and Mr. Tono came earliest. Fill in the <h3> so the card writes the first person on that list.
  3. Mr. Asep added a Daftar button. It must be off when the waiting seats are full (penuh), and on while there is room. Only two of six people are waiting. Bind the button's disabled to penuh so the neighbourhood head can sign up.
  4. Every Friday noon the kiosk closes for Friday prayer, and the timetable on the screen must say so. The 11.30 row has a single cell, Tutup, salat Jumat, that has to stretch over the Nama and Model columns. Its width comes from kolom. Bind that cell to kolom.
  5. On the bench people argue about whose turn it is. Mr. Asep wants the card of the person first in line framed in orange (the giliran class), and each card to have a waiting bar menit * 2 pixels wide. When he presses Panggil, Mr. Tono moves to the chair and the turn moves to Bagas. Fill in the class and style bindings.
  6. Mr. Asep put a name box on the screen. As someone types, the card below it should write that name letter by letter. When they press Enter, the name joins the queue. Bagas tries it. Choose the event for each of the two bindings.
  7. Over the barber's chair hangs a status card. When Mr. Asep presses Mulai cukur, the card must get an orange frame through [ngClass] and its text must change to Sedang mencukur Pak Tono. Fill in the component's imports and the @case for the 'dicukur' status.
  8. The name box only shows while the kiosk is open, so Mr. Asep wrapped it in @if (buka). The Daftar button reads the box through the template variable #nama. Mr. Bayu types his name and taps Daftar. Put one button in the right place: inside the @if block, or after it.
  9. Mr. Asep moves to a real form with FormsModule. The ngModel inputs inside a <form> are gathered into one object, f.value, sent when the form is submitted. Mr. Harun fills in his name and taps Daftar. Complete the input so his name arrives as nama.
  10. A name in the queue needs at least three letters. The message Nama paling sedikit 3 huruf must appear only after a customer leaves the box while its value is not valid yet: not before they start, and not while they are still typing. The Daftar button stays off while the form is not valid. Dimas tries: he taps Daftar, types Di, taps again, then finishes his name.
  11. The queue card now takes its contents from outside: the name in an <h3>, the hairstyle in <p class="model">, and the customer's note in <p class="catatan">. The hairstyle must go into the photo box, and Mr. Karim's note must still show below it. Fill in the photo slot's select and the rest of the card's template.
  12. Mr. Asep gave the queue card an orange title and an orange line on top. Beside it sits the price board, another component, whose title must stay cream. The card's style must not leak onto that board, the card must keep the kiosk's own look (styles.css), and the line goes on the <kartu-antre> element itself. Fill in the line's selector and the encapsulation mode.

And more, 16 levels in all.