使用select选项显示数据时遇到问题: 在控制台中没有显示错误和显示数据,但屏幕用户没有任何事情发生:
查看
if( wanting child to exit )
{
int status;
fprintf(stderr, "game_over\n"); //ENDS CHILD
wait( &status );
return 0;
}
fprintf( stderr, "next command to child\n" );
read(fds[PIPE_READ], buff, sizeof(buff));
成分:
HTML:
<select id="genero" class="form-control" #genero="" >
<option value="">Please Select</option>
<option *ngFor="let genero of generos" [ngValue]="genero">{{genero.name}}</option>
</select>
服务:
export class:
public geneross: Generos[];
ngOnInit() {
this._generoService.getGeneros(this.token).subscribe(
response => {
this.generos = response.generos;
});
}
如果我使用:
getGenereos(token){
let headers = new Headers({
'Content-Type':'application/json',
'Authorization':token
});
return this._http.get(this.url+'generos/', { headers: headers })
.map(res => res.json());
}