learning-ionic / Chapter-8

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

chatToUser > loggedInUser, how can you compare 2 user object? #1

Open hughred22 opened 9 years ago

hughred22 commented 9 years ago

Sorry can not find a support forum for the book and I will ask question here for your source code (I can provide my purchase receipt if necessary).

I am reading Chapter 8 your Firebase messaging app. I do not get the getHash function in the Utils service. You do this: if (chatToUser > loggedInUser) But how can you compare 2 user object?

arvindr21 commented 9 years ago

chatToUser & loggedInUser are 2 strings. Why this works: http://stackoverflow.com/a/7087831/1015046