Angular - The pipe 'keyvalue' could not be found
The KeyValue Pipe is available in angular 6.1 to Update your dependencies it will work
If you are using angular 6 you can try this
HTML
<div *ngFor="let prop of key">
<div>key: {{prop}}</div>
<div>value: {{testObj[prop]}}<div>
</div>
TS
testObj = { id: 1, name: "Abdul Rafay" }
get key(){
return Object.keys(this.testObj);
}
Example: https://stackblitz.com/edit/angular-6-template-x9hady
Your code is fine. You just need to update your dependencies to 6.1 to use keyvalue
pipe.
Stackblitz here