Angular Ngfor Sort By Key Code Example


Example: angular 6 key value pair getvalue example

@Component({   selector: 'app-myview',   template: `<div *ngFor="let key of objectKeys(items)">{{key + ' : ' + items[key]}}</div>` })  export class MyComponent {   objectKeys = Object.keys;   items = { keyOne: 'value 1', keyTwo: 'value 2', keyThree: 'value 3' };   constructor(){} }

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable