I’m working on a new Ionic2 App. The problem that I’m facing is that the data is not getting updated in the template after the promise is resolved. This issue is specific to Safari and IOS emulator. Is there any plugin or someething that is needed to be added for running on the mentioned browser/emulator. I searched on net for the issue and found that many faced this issue. Can someone help me out
This really depends on how “the promise” is being generated.
this.http.get(“json path”).toPromise().then(response => response.json().node as Team) .catch(this.handleError).
This is what I’ve written in my service.
If it’s coming from Angular’s
Http, that should work. Are you certain that the network request is succeeding and that the promise is actually resolving?
Yes, at first I too though the same that there was something wrong with the http request but then I added the console.log() and I could see the expected output in my browser console. It’s getting rendered in chrome and android but not in Safari and IOS emulator
Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Safari dev tools: https://ionic.zone/debug/remote-debug-your-app#ios Look at the console and network tabs for errors.
Found the issue. The ios-sim and ios-deploy was not installed in my system. Apologies for bothering everyone who replied in the thread.
I am using observables with api calls. yet my view does not render when data is returned from the api. This issue basically occurs in IOS 9.3.4 and other lower end devices.