Struggling to understand... I want to make a GET request to my service to retrieve the specific hardware associated with the barcode I scanned - this part is working correctly.
The hardware information is returned as an object that looks like this ->
https://i.sstatic.net/sCN8e.png
However, when I try to display this object on my frontend, all I see is [object Object]
.
component.html
{{ terminal }}
component.ts
terminal: any[] = [];
constructor(private terminalService: TerminalService) { }
this.terminalService.getTerminalByBarcode(barcode).subscribe(terminal => {
console.log(terminal.terminal);
this.terminal = terminal.terminal;
});
I've even attempted using terminal: Object;
, but it hasn't made a difference. Can anyone point out where I might be going wrong with two-way data binding?