angular-forms-example
angular-forms-example copied to clipboard
after submit
After submit the Pizzas order
list will not display the toppings. It resets and displays it on click
Hi,
i corrected this issue by using clones, otherwise the original ToppingItem[ ] is modified while preparing the DTO object.
createPizzaOrderDto(data: IPizzaFormInterface): IPizzaFormInterface { const order = { customerDetails: this.simpleClone(data.customerDetails), pizzas: this.simpleClone(data.pizzas) };
[...]
simpleClone(obj: any) { return Object.assign({}, obj); }
But i'm not allowed to make a pull request...