Instead of using $.ajax
try to use $http
angular service to call server that will trigger the angular digest cycle .
demoapp.factory("authser", function ($location,$http) {
//
$http({
method: 'POST',
url: "/valued/newvalue",
responseType: "json",
data: { 'name': credantials.username, 'password': credantials.password }
}).success(function (data) {
console.log(data);
$location.path('/logout');
});