I have a page that has a navbar on it. when you click on a button in the navbar it should redirect you to a search page, and open a modal dialog. I'm not sure what I'm doing wrong, but it won't redirect to the page I've specified in the ng-click directive and the modal only opens when it has the search page open. Here's my button in the navbar
<button class="btn default-btn advancedbtn" data-toggle="modal" data-target="#myModal" ng-click="redirect()">Advanced</button>
Here's the code to redirect in my controller:
$scope.redirect = function () {
$location.url('/search');
}
I'm probably going about this in the wrong way. If any other code is needed let me know. Thanks.