Hi I want display my value from response http but I don't know what is the problem.
http :
getAllApiContext(){
const options = this.getOptions("...");
return this.http
.get("jenkins/job/api_initialization/api/json", options)
.map((data: any) => {
return data.json().property[0].parameterDefinitions[1].choices;
})
}
She return array.
My component.ts
context: Observable<Array<any>>;
ngOnInit() {
this.jenkinsJob.getAllApiContext().subscribe(data => {
this.context = data;
});
};
My component.html
<span *ngFor="let item of context | async">
<p>{{item}}</p>
</span>