#include<stdio.h>
#include<pthread.h>
void* myprint(void *x)
{
int k = *((int *)x);
printf("\n Thread created.. value of k [%d]\n",k);
//k =11;
pthread_exit((void *)k);
}
int main()
{
pthread_t th1;
int x =5;
int *y;
pthread_create(&th1,NULL,myprint,(void*)&x);
pthread_join(th1,(void*)&y);
printf("\n Exit value is [%d]\n",y);
}
Хотя из твоего вопроса не ясно, что ты на самом деле хочешь делать, но я попытался угадать. Посмотри, может ли это помочь. Сохраните ответ URL-адреса в переменную, а затем используйте шаблон (html) для цикла.
Components.ts
res => {
console.log(res);
this.data = res;
}
Component.html
<tr *ngFor="let i of data;" mdbTableCol ><td style="float:left">
<a class="dropdown-item waves-light" mdbWavesEffect><strong>{{ i.classid }}</strong>
</a>
<a class="dropdown-item waves-light" mdbWavesEffect><strong>{{ i.url }}</strong></a>
</td>
</tr>