ryancp / sailng

Sails.js + Angular = Awesome
MIT License
164 stars 38 forks source link

Back and forward doesn't work as expected #6

Open AndreasHeintze opened 10 years ago

AndreasHeintze commented 10 years ago

After clicking som links I noticed that Register and Login doesn't look like the other "pages". I is missing the header. There is just the form, nothing else. Should it be like that? ...and if I after going to either the Register och Login page, then trying to go back with the back button, well the URL change but nothing else...

johntom commented 10 years ago

I've experienced this and have a working copy and using beyond compare to determine what is different. Will hopefully have something later today but my guess is that some lib has changed (sails-disk?).

John

From: tidelipop [mailto:notifications@github.com] Sent: Monday, April 21, 2014 6:22 AM To: ryancp/sailng Subject: [sailng] Back and forward doesn't work as expected (#6)

After clicking som links I noticed that Register and Login doesn't look like the other "pages". I is missing the header. There is just the form, nothing else. Should it be like that? ...and if I after going to either the Register och Login page, then trying to go back with the back button, well the URL change but nothing else...

— Reply to this email directly or view it on GitHub https://github.com/ryancp/sailng/issues/6 . https://github.com/notifications/beacon/1877376__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMzY5NDkwNSwiZGF0YSI6eyJpZCI6MzA0MjUxNjF9fQ==--4f529bffd3accb8837259cde4f0c4fc5a1c8400d.gif


No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4355 / Virus Database: 3882/7371 - Release Date: 04/20/14

johntom commented 10 years ago

Beyond compare show problems in \sails repo.

I tried a manual npm install

sails@0.10.0-rc5

sails-disk@0.10.0

Had the same error

I then copied over a node_modules \sails from a working install the repo works fine.

I even deleted .tmp/localDiskDb.db for many of the tests. (make sure you use a 8 char password as minimum).

Right now I think something is wrong with npm sails...

FYI, I ran into same issues testing my fork.

John

attached image shows missing directories.

From: tidelipop [mailto:notifications@github.com] Sent: Monday, April 21, 2014 6:22 AM To: ryancp/sailng Subject: [sailng] Back and forward doesn't work as expected (#6)

After clicking som links I noticed that Register and Login doesn't look like the other "pages". I is missing the header. There is just the form, nothing else. Should it be like that? ...and if I after going to either the Register och Login page, then trying to go back with the back button, well the URL change but nothing else...

— Reply to this email directly or view it on GitHub https://github.com/ryancp/sailng/issues/6 . https://github.com/notifications/beacon/1877376__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMzY5NDkwNSwiZGF0YSI6eyJpZCI6MzA0MjUxNjF9fQ==--4f529bffd3accb8837259cde4f0c4fc5a1c8400d.gif


No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4355 / Virus Database: 3882/7371 - Release Date: 04/20/14

johntom commented 10 years ago

Sorry for prevous post as it was wrong even though it worked somethomes, I finally found the issue https://github.com/balderdashy/sails/issues/1607 Change .done to .exec (.done is a deprecated / possibly removed alias for .exec)

drmikecrowe commented 10 years ago

@johntom -- does this just fix back/forward? Allowing registration? Header on register/login?

I've tried this fix, and I can register now, but the Registration/Login page is still missing the header, and back/forwards still doesn't wrok

johntom commented 10 years ago

I believe that's because they are not defined as partials. Will eventually get to this or perhaps Ryan has something in the works.

ryancp commented 10 years ago

@drmikecrowe, that's correct - the header is missing on register and login views. This is because they are outside of the angular single page app.

The back button issue where you go to /register and then try to go back to /home for example, doesn't happen in firefox oddly enough. Not sure what the issue is with chrome.

I am looking into this one. Let me know if anyone has an idea about the root cause.

LeonardoGentile commented 9 years ago

I have this one too

huguangju commented 9 years ago

if you comment these codes:

$urlRouterProvider.otherwise(function ($injector, $location) {
        console.log($location.$$url, $location.$$absUrl, $location.url(), $location.absUrl())

        if ($location.$$url === '/')     {
            window.location = '/home';
        }
        else {
            // pass through to let the web server handle this request
            window.location = $location.$$absUrl;
        }
    });
    $locationProvider.html5Mode(true);

and uncomment this line of code:

// $urlRouterProvider.otherwise( '/home' );

everything will be ok!

I want to know to do so much for what purpose? just let the web server handle this request? why?