这是我的场景:(在控制器中)
var userData = $http(
{
method: "post",
url: "http://localhost/t-app/mobile-data/update-tasks.php",
data: {
done_tasks : $scope.done_tasks,
job_id: $routeParams.job_id,
employee_id: $scope.user_id,
},
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});
userData.success(function (userdataobject)
{
$scope.message = userdataobject["message"];
$scope.status_id = userdataobject["status_id"];
$location.path("/taskStatus");
});
现在我的路线是这样的:
$routeProvider.when('/taskStatus', {templateUrl: 'partials/task-status.html'});
我task-status.html
的是这样的:
<div ng-if="status_id == '1'" style="color:black">
<h4 class="text-center" >{{message}}</h4>
<div ng-bind="message"> </div>
tum hi to ho
</div>
<div ng-if="status_id == '0'" style="color:black">
<h4 class="text-center">{{message}}</h4>
tum nhi ho
<div ng-bind="message"></div>
</div>
现在我的问题是task-status.html
我没有得到{{message}}
表达ng-bind="message"