I'm doing an application on Ionic 3, linked to a php-slim-Restful. In this application, when you login, link it via POST to the URL of the php-slim-resful. I used the following function so that in the console I keep the data (object) and thus use it:
localStorage.setItem('userData', JSON.stringify(this.responseData) )
When logging out I put the LocalStorage.clear () function; so that the data with which I had logged in was cleaned. The problem here is that from my welcome screen when I click on "Go to start session" this error is sent to me:
Error: Uncaught (in promise): TypeError: data is null c @ http: // localhost: 8100 / build / polyfills.js: 3: 13535 or / < @http: // localhost: 8100 / build / polyfills.js: 3: 12891 NavControllerBase.prototype._fireError @ link ost: 8100 / build / vendor.js: 43269: 13 NavControllerBase.prototype._failed@http: // localhost: 8100 / build / vendor.js: 43257: 9 NavControllerBase.prototype._nextTrns / < @http: // localhost: 8100 / build
The truth is that I do not know why. Someone could help me? It should be noted that after I entered the method localstorage.clear (); That mistake came to me.