Closed NimaiMalle closed 7 years ago
in src/providers/user.ts, I had to change the way that the callback functions are declared in order to get the a this which refers to a User object, or else the call to this.isAuthenticated fails.
src/providers/user.ts
this
this.isAuthenticated
- 'onSuccess': (result) => { + 'onSuccess': function(result) {
- 'onFailure': (err) => { + 'onFailure': function(err) {
global packages: @ionic/cli-utils : 1.4.0 Cordova CLI : 7.0.1 Ionic CLI : 3.4.0 local packages: @ionic/app-scripts : 2.0.0 @ionic/cli-plugin-cordova : 1.4.0 @ionic/cli-plugin-ionic-angular : 1.3.1 Cordova Platforms : browser 4.1.0 Ionic Framework : ionic-angular 3.5.0 System: Node : v7.10.0 OS : macOS Sierra Xcode : Xcode 8.3.3 Build version 8E3004b ios-deploy : not installed ios-sim : not installed npm : 4.2.0```
There was already a Pull Request to fix this: "Proper syntax for onSuccess and onFailure callbacks"
in
src/providers/user.ts
, I had to change the way that the callback functions are declared in order to get the athis
which refers to a User object, or else the call tothis.isAuthenticated
fails.$ ionic info