After searching and not coming up with a solution I am posting this code snippet for some help.
$scope.createAddress = function () {
$http({
method: 'POST',
url: '/addressBook/api/Person',
data: $scope.person,
headers: {
'Content-Type': 'application/json; charset=utf-8'
}
}).success(function (data) {
$location.path('/addressBook');
});
}
After successfully posting I would like to redirect to a different page. $location.path is not accomplishing this. I have tried $scope.apply() as some others have had success with that. Am I missing something or not understanding what $location is used for? The code is being hit.