Spring MVC AngularJS - Post Redirect
<p>I believe I am just missing something obvious. </p>

<p>I have a post that works but it gives me HTML as response. Normally that would be great if I was actually trying to load some more information on the current page. But I really want it to redirect. </p>

<p><strong>The post in MainService.js</strong></p>

<pre><code>searchOpportunities : function(title, location) {
                                return $http
                                        .post(
                                                '/',
                                                $.param({
                                                    title : title,
                                                    location : location
                                                }),
                                                {
                                                    headers : {
                                                        'Content-Type' : 'application/x-www-form-urlencoded'
                                                    }
                                                })
                            }
</code></pre>

<p><strong>The response</strong></p>

<pre><code>@RequestMapping(value = "/", method = RequestMethod.POST)
    public ModelAndView search_Post(@RequestParam(value = "title", required = true) String title, @RequestParam(value = "location", required = true) String location) {
        ModelAndView searchView = new ModelAndView("search");
        searchView.addObject("searchTitle", title);
        searchView.addObject("searchLocation", location);
        return searchView;
    }
</code></pre>

<p>To clarify:</p>

<p>I want the page to change to the searchView after the post is sent. Right now it's just sending HTML as response... but I want redirect with the right objects "searchTitle" and "searchLocation"</p>