Benjie Pajimola Benjie Pajimola - 2 months ago 8
HTML Question

Display the data in my html like the date

I wanted to display the date of the system on my page so i created a php code and using my controller i use http.post. But my problem is this This is the data that shows on my page

This are my codes.
In my controller

var linkdate = 'http://127.0.0.1/mobile/date.php';

$http.post(linkdate).then(function(date) {
$scope.response= date;
})


In my html

{{response}}


And in my php code

<?php
$Today = date('y:m:d');
$new = date('l, F d, Y', strtotime($Today));
echo $new;
?>


Can you help me to solve this problem? any help will do thanks.

Answer

what about this:

$http.post(linkdate).then(function(data) {
    $scope.response= data.data;
})
Comments