-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
In Step 3, this line is not needed:
this.buyCar = function(id) {
carsSrvc.buyCar(id);
this.cars = carsSrvc.cars; // <====== this one
}
I don't know Angular well but I'd imagine this line might not be a great idea:
this.cars = carsSrvc.cars
(there are actually 2 of that line; it's the same idea for both). You've got a reference to the service's data. The service should probably expose a getter to get a copy of the data. I realize this is not a production app but probably worth starting good habits. Thoughts?
Metadata
Metadata
Assignees
Labels
No labels