ngfor object
<div *ngFor="let item of testObject | keyvalue">
Key: <b>{{item.key}}</b> and Value: <b>{{item.value}}</b>
</div>@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(){}
}
Also in HTML:
- read only attribute in html
- html div tag
- webforms validate radio buttons
- stylesheet einbinden html5
- how to center align text in html
- html video repeating
- hotlink html
- Failed to load module script: The server responded with a non-JavaScript MIME type of "application/json". Strict MIME type checking is enforced for module scripts per HTML spec.
- how to change tag name in js html
- dropdown menu html
- html iframe tag
- coronavirus
- select all instances vscode
- vmware workstation ubuntu 18.04
- how to add a search engine in html
- how to add jquery to html
- html hyperlink with question mark in a form action
- how to substract date object javascript
- change html title
- embed youtube channel in html
- download button html
- html radio button checked
- bootstrap fixed navbar
- mailto subject