Skip to main content
added 151 characters in body
Source Link
AVJT82
  • 73.6k
  • 25
  • 146
  • 170

You have an error:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicle = vehicle;
})

but in your html you refer to let vechicle of vehicles

You should add an "s" to your this.vehicle to your subscription like so:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicles = vehicle;
})

Edit: Just forgot to meantion to change the local variable vehicle: Vehicle[] to vechicles: Vehicle, but that you figured out that yourself! ;)

You have an error:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicle = vehicle;
})

but in your html you refer to let vechicle of vehicles

You should add an "s" to your this.vehicle to your subscription like so:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicles = vehicle;
})

You have an error:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicle = vehicle;
})

but in your html you refer to let vechicle of vehicles

You should add an "s" to your this.vehicle to your subscription like so:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicles = vehicle;
})

Edit: Just forgot to meantion to change the local variable vehicle: Vehicle[] to vechicles: Vehicle, but that you figured out that yourself! ;)

Source Link
AVJT82
  • 73.6k
  • 25
  • 146
  • 170

You have an error:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicle = vehicle;
})

but in your html you refer to let vechicle of vehicles

You should add an "s" to your this.vehicle to your subscription like so:

this.vehicleService.getVehicle().subscribe(vehicle => {
        this.vehicles = vehicle;
})