Creating the Pizza View

Let's create a pizza view so that we can display different kinds of pizzas on the menu. We'll use FormGroupName to bind selectors like size and toppings with pizza.

Pizza form view

The pizzaModel is where the meat of this form exists (as well as the dough, tomato sauce, and other toppings). It’s set up at the root as an array (who orders just one pizza?), so we’ll clone the FormArray work from the previous form: ...

Press + to interact
get pizzas(): FormArray {
return this.pizzaForm.get('pizzas') as FormArray;
}
addPizza() {
this.pizzas.push(this.fb.group(new Pizza()));
}

Now that the boilerplate is out of the way, it’s time to start ...

Access this course and 1400+ top-rated courses and projects.