I am building an using laravel4 and angular at the front end. After submit data from a form I want to redirect to another route but I do not know how to exactly do this since I submit data using angular $http service. The route is already defined in laravel, but how do I redirect? Please some guide me through thanks.
I guess when your form is being submitted, it goes through a controller class like SubmitFormController
. There you could simply redirect like this:
return Redirect::to('home');
If you're wondering how to redirect to a page with javascript:
window.location.href = 'home';
Maybe I'm not understanding your question. In that case please clearify your question.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.