These are chat archives for FreeCodeCamp/Help

27th
Mar 2015
Nathan
@terakilobyte
Mar 27 2015 00:17
The question is did you use map to transform the data
Germaine Pannell
@germainep
Mar 27 2015 02:36
does anyone no a way to rollback a commit to github
Oliver
@Dadsaster
Mar 27 2015 05:15
@germainep - don't know if you figured it out: https://www.atlassian.com/git/tutorials/undoing-changes/git-revert
Germaine Pannell
@germainep
Mar 27 2015 12:56
@Dadsaster I didn’t but the changes weren’t drastic so I beleive we can live with them
Oliver
@Dadsaster
Mar 27 2015 14:37
@germainep glad I could help
piecedigital @piecedigital if you want to go through the Code School Nodejs and Expressjs courses they are currently free. Not sure for how long
Harshal
@McQuinTrix
Mar 27 2015 20:39
@piecedigital it should be just the first level, all other are still paid .. ):
Ashley Drake
@aldraco
Mar 27 2015 20:48
question for angularly-gifted folks: I am trying to use a service to persist state (i.e. user is logged in or not) across my application. I couldn't get it to work with regular old express routes until I changed the login route to basically behave like middleware (with a next() function). Why is that?
also - how does this affect logging in via 3rd party services like twitter, with callbacks and such? (that's a much longer question probably)
Bianca Mihai
@biancamihai
Mar 27 2015 20:51
@aldraco you added the method that checks if the user is logged in or not in the route resolve?
Ashley Drake
@aldraco
Mar 27 2015 20:52
no, it's called from a controller that is present on every page (i.e. in the index.html so it never gets refreshed). I'm not assuming that I did that right, so if that's wrong I'd love to know why!
the service basically pings my server to see if there is a session/user present. it tracks this in a variable called isloggedin.
Bianca Mihai
@biancamihai
Mar 27 2015 20:56
well, usually when I'm implementing authentication from angular I'm creating a service for this, a method ex isLoggedIn() and I use this method in resolve for every route that has to be protected
Ashley Drake
@aldraco
Mar 27 2015 20:59
thanks @biancamihai ... so where do you declare and call this method? the service?
Bianca Mihai
@biancamihai
Mar 27 2015 21:01
sorry, my internet connection is really bad, the service I declare it as a factory and inject it in the module where is used
Ashley Drake
@aldraco
Mar 27 2015 21:03
interesting ... thanks for the link !
Bianca Mihai
@biancamihai
Mar 27 2015 21:12
@aldraco you use ng-controller?
Ashley Drake
@aldraco
Mar 27 2015 21:13
controllerAs, declared on the routes, except for the navigation bar, which is present on every page and doesn't refresh. there i use ng-controller
Bianca Mihai
@biancamihai
Mar 27 2015 21:14
aham, you can use a directive for the nav bar ...
Ashley Drake
@aldraco
Mar 27 2015 21:15
ahhh that's true ...
Bianca Mihai
@biancamihai
Mar 27 2015 21:15
:)
Ashley Drake
@aldraco
Mar 27 2015 21:15
i am going to go eat dinner but thanks for your help, i think i'm on a better track now.
Bianca Mihai
@biancamihai
Mar 27 2015 21:15
great!
Ashley Drake
@aldraco
Mar 27 2015 21:15
:)