Answers for "angular map in html"

6

ngfor on keys of a dictionary angular

<div *ngFor="let item of testObject | keyvalue">
    Key: <b>{{item.key}}</b> and Value: <b>{{item.value}}</b>
</div>
Posted by: Guest on April-30-2020
0

angular loop through key values in map

this.map.forEach((value: string, key: string) => {
    console.log(key, value);
});
Posted by: Guest on August-21-2020
3

angular map

let map = new Map();
map.set() – method to add entries in Map
map.get() – to retrieve an entry from Map
map.has() – to existence of an entry in the Map
map.delete() – deletes an entry from the Map
map.size – ‘size’ property will return size of Map
map.clear()-to clear the Map data
Posted by: Guest on September-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language