$http Post & Passport.js Redirect May 30, 2024 Post a Comment I have a multi-step Angular.js form for signup that saves all the users input into: $scope.user = {}; Then I use ng-submit like so: Solution 1: Not shure, but it might help.In Angular: $scope.signup = function(){ return$http.post('/signup',$scope.user) .then(function(data) { location.replace(data.redirectUrl); // use appropriate function to update route }); }; CopyIn nodejs:Baca JugaXmpp: Angularjs + Strophe.jsIs There Any Way To Prevent Input Type=“number” Getting More Than One Dot Values?Magento Sort Product List With Isotope Or Masonry app.post('/signup', passport.authenticate('local-signup', { failWithError: true }), function(req, res, next) { // successreturn res.json({ redirectUrl: '/profile' }); }, function(err, req, res, next) { // errorreturn res.json({ redirectUrl: '/' }); } ); Copy Share You may like these postsRjs: Ajaxified Select_tagResolving Sync Between Mddialog And Api Response In AngularjsIs There A Css Alternative To Js Click, (as :hover Is An Alternative Mouseover / Mouseout)?How To Check With Loops How Many Times User Punched A Password? Post a Comment for "$http Post & Passport.js Redirect"
Post a Comment for "$http Post & Passport.js Redirect"