Hey, i am currently developing an App for my graduation at a higher technical collage.
My problem is that, my app does not get any data on mobile devices. Is it possible that the HTTPClient from Angular does not work on mobile devices? Please be not distracted by the localhost, i use a VPN to be in the network where the backend runs.
Could you please tell me what i have to use or whats the problem? I could not find any satisfying solutions online.
Here is my ApiDataService:
import { HttpClient } from ‘@angular/common/http’;
@Injectable({
providedIn: ‘root’
})
export class APIDataService {
private api = ‘http://localhost:11218/lehrer’;
private id = ‘SCRE’;
private gruppen: Gruppe;
private schueler: Schueler;
constructor(
private http: HttpClient,
private storage: Storage
) { }
getGruppen(): Observable<Gruppe> {
return this.http.get<Gruppe>(${this.api}/gruppen/${this.id}
);
}
getSchuelerFromGruppe(grpId: number): Observable<Schueler> {
return this.http.get<Schueler>(${this.api}/schueler/gruppen/${grpId}
);
}