export class DropDownService {
private dockerURL;
constructor(private infoService: InfoService){
this.infoService.getVersion().subscribe((URL) => {
this.dockerURL = URL;
});
// How to make sure the dockerURL is loaded
// before getStructureType is invoked from other services
}
getStructureType(): Observable<StructureType[]> {
return this.http.get<StructureType[]>(this.dockerURL+'/structureType');
}
}
How to make sure dockerURL is loaded before getStructureType is invoked from other services?