Sander, Thanks for the reply. Yes should have mentioned I was using an abbreviated version of my true code and negated abstracting it to a service in the question's code.
I posted the answer that I went with after talking to some people in the gitter community. They suggested using a stream (getUserUid helper method to use with methods that need it). https://stackoverflow.com/questions/46797323/how-to-get-current-authenticated-user-angularfire2-angular-so-that-it-is-usabl *What you suggested is what I was thinking to do but confused. * If I store it in the Auth service doesn't act in the same way to if I use a using a AuthService (Service A) method to call it in and store in ServiceB (that is using the AuthService). I mean it still has to be instantiated when DI'ed. When DI'ed it would then to act to store in the AuthService method. Or doe the AuthService Method get Instatiated on app bootstrapped(or at some point before the DI into Service B) And thereforecan inject the UID that was already stored. On Wednesday, October 18, 2017 at 3:46:06 AM UTC-4, Sander Elias wrote: > > Hi Jamie, > > Can't you store it in your AuthService? Also, I would move getUserFeed > stuff into its own service, that than can store the user for itself, > without you even need to touch the 'user' in the component at all. > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
