learning-ionic / Chapter-8

Building a Messaging App
https://www.packtpub.com/application-development/learning-ionic
11 stars 18 forks source link

In ChatDetailCtrl $scope.chatToUser is null after Login #9

Open tej-rana opened 8 years ago

tej-rana commented 8 years ago

I get to the ChatDetailCtrl and $scope.chatToUser is null.

I don't understand. I cleared all the online users in firebase, restarted the app, logged in with my gmail account, got to the DashCtrl. When I log the user key it shows what is currently in firebase. Once I click the arrow to take me to the ChatDetailCtrl it stops there.

Well obviously there is no "other" user to begin with. So the application logic is flawed. You cannot do JSON.parse(null).

I don't understand how you were able to run in the book. I checked all your sources and I have the same source.

I tried this on an emulator and a device.