Let me explain the situation: (in controller)
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");
});
Now, this is how my route is set up:
$routeProvider.when('/taskStatus', {templateUrl: 'partials/task-status.html'});
and in my task-status.html
:
<div ng-if="status_id == '1'" style="color:black">
<h4 class="text-center" >{{message}}</h4>
<div ng-bind="message"> </div>
You are the one
</div>
<div ng-if="status_id == '0'" style="color:black">
<h4 class="text-center">{{message}}</h4>
You are not the one
<div ng-bind="message"></div>
</div>
The issue I'm facing now is that the {{message}}
expression and ng-bind="message"
are not displaying correctly on the task-status.html
page.