I think that the value you set in the indexes property isn't an array but an object.
I would see several reasons for this:
You receive the response instead of the payload from the
getIndexesmethod. In this case, you could use themapoperator in this method:getIndexes() { return this.http.get(...).map(res => res.json()); }The received payload doesn't correspond to an array but some of its properties. In this case, you need to set this property into the
indexesproperty.
If you want to iterate over the properties of an object, you need to implement a custom filter like this:
@Pipe({name: 'keyValues'})
export class KeysPipe implements PipeTransform {
transform(value, args:string[]) : any {
let keys = [];
for (let key in value) {
keys.push({key: key, value: value[key]);
}
return keys;
}
}
and use it like that:
<div class="div_IndxPartition" *ngFor="#indObj of indexes | keyValues">
(...)
</div>
See this question: