Basically i am not a JS developer. But for an application i am using angularjs as front end and nodejs as a backend.
In angularjs i have written a form that needs to be filled by a user, once user fills that form he can submit it using submit button. On submit button click event i have written below code.
<div class="submit" align="center">
<input type = "submit" value="Submit !" ng-click="addResume()">
</div>
Where addResume() is a function declared inside angular controller as below -
$scope.addResume = function(){
console.log($scope.resume);
$http.post("/Resume", $scope.resume);
};
This function will call a function on node js server. That will simply print the request fields and route on the success.html page. Please see below code for this--
app.post('/Resume',function(req,res, next){
console.log(req.body);
// res.render(path.join(__dirname)+'/views/success.html');
next();
})
Now the problem i am facing is that i am able to get the data submitted through the angular form but application doesn,t move to the success page i tried both the options res.render and next() but not able to flow to success page.
Please help me out on this issue.