Closed Jassiem closed 10 years ago
Might not get my new login/signup partials pushed this evening. I'll let you know when I do.
Hopefully by the time I push them I can also confirm that they are properly creating/logging in users.
I have the api service and the user data service working. Do you want me to push first or wait for you? I forgot exactly what you changed. I've made a couple of small changes to the login/dashboard controllers, but it was just for testing. It can all be removed.
On Sun, Jan 26, 2014 at 11:50 PM, johndutter notifications@github.comwrote:
Might not get my new login/signup partials pushed this evening. I'll let you know when I do.
Hopefully by the time I push them I can also confirm that they are properly creating/logging in users.
— Reply to this email directly or view it on GitHubhttps://github.com/johndutter/metube/issues/8#issuecomment-33341986 .
I merged my AngularService branch with master and pushed. I made use of the api service and the user data service in the dashboard controller and the login controller. I left the test stuff in there so you could see that it worked.
Do you think api call should just call whatever URL you give it and not tack it onto /api?
I merged your stuff into mine and pushed to master.
Tomorrow I plan to work on secured/unsecured partials.
I also need to work on actually using that global userdata to display/not display some things like login/logout in the dashboard.
I have some homework so we'll see how quickly I can get it done.
@Jassiem I just pushed to master with my latest.
This includes a logout function that works. It also includes a get-user-info route and controller in rails that work.
The problem is that our global service isn't working quite how we expected (the update won't propagate to all controllers using that UserData). Unless I'm doing something wrong. Look here: https://variadic.me/posts/2013-10-15-share-state-between-controllers-in-angularjs.html
It would work if say Nav was waiting to look at UserData until a function.
I.e. 'click me' does $scope.data = UserData
then Nav would show an update that occurred if you clicked 'click me'. But if UserData was already $scope.data = UserData then someone else changes UserData Nav won't see the difference in $scope.data.
Unless I'm doing something wrong I very well may be.
Either way you can pull when you have the time this is pretty much all working other than this UserData problem.
I cleaned up the controllers as well.
Ok so I just pushed a few changes to master.
Let me know what you think.
Overall I think we've made some really good progress this week already. Come this weekend we should be in a good position to really dive into the complexities of a master layout.
Yea you're right. The flicker is kind of annoying. Let's put the check login back in.
With that function I don't think we'll need interceptors right? Unless you can think of another use.
I think we'll be able to come up with a layout and start on the video model this weekend. On Jan 29, 2014 10:37 AM, "johndutter" notifications@github.com wrote:
Overall I think we've made some really good progress this week already. Come this weekend we should be in a good position to really dive into the complexities of a master layout.
Reply to this email directly or view it on GitHubhttps://github.com/johndutter/metube/issues/8#issuecomment-33595295 .
How I had the interceptor before (not sure what changes were made) was for the API (like if you hit an API when you were supposed to be logged in and then the server sends back a 401 then angular is like "oops redirect to login somehow you got logged out and should have not triggered that api call").
So I think we should keep that we would still want that behavior if someone ever calls some api somehow and is not logged in--we'd return a 401 in rails and they would get redirected to /login. This wouldn't flicker because they'd be doing an api call from a controller/partial that is already loaded.
Does that sound right?
Oh I see. Ok yea, we'll need both then. On Jan 29, 2014 10:56 AM, "johndutter" notifications@github.com wrote:
How I had the interceptor before (not sure what changes were made) was for the API (like if you hit an API when you were supposed to be logged in and then the server sends back a 401 then angular is like "oops redirect to login somehow you got logged out and should have not triggered that api call").
So I think we should keep that we would still want that behavior if someone ever calls some api somehow and is not logged in--we'd return a 401 in rails and they would get redirected to /login. This wouldn't flicker because they'd be doing an api call from a controller/partial that is already loaded.
Does that sound right?
Reply to this email directly or view it on GitHubhttps://github.com/johndutter/metube/issues/8#issuecomment-33597469 .
I'll go ahead and add the check login function back and then push On Jan 29, 2014 10:56 AM, "johndutter" notifications@github.com wrote:
How I had the interceptor before (not sure what changes were made) was for the API (like if you hit an API when you were supposed to be logged in and then the server sends back a 401 then angular is like "oops redirect to login somehow you got logged out and should have not triggered that api call").
So I think we should keep that we would still want that behavior if someone ever calls some api somehow and is not logged in--we'd return a 401 in rails and they would get redirected to /login. This wouldn't flicker because they'd be doing an api call from a controller/partial that is already loaded.
Does that sound right?
Reply to this email directly or view it on GitHubhttps://github.com/johndutter/metube/issues/8#issuecomment-33597469 .
Ok I added it back in and pushed. Its much better without the flicker.
Read up on/ Think about: user levels. How to handle in Angular & rails. Promises possibly. nested states overall ui layout