Angularjs state.go does not reload the php file

advertisements

I have a code which uses ui-router. It is navigating in 2 files(state). 1 is the php file which displays all the contents of an SQL db, while the other is an HTML file retrieving data from 1 row of the SQL db.

The php file is getting the contents of the db using

$inbox = mysql_query("SELECT * FROM wps LIMIT $offset,$limit");
$rows = mysql_num_rows($inbox);

while($row = mysql_fetch_assoc($inbox)){
      $id = $row['id'];
      $RDate = $row['RDate'];
      echo '<tr class="border_bottom">';
        echo '<td><a href="#" ng-click="GoTohtmlstate('.$id.')">'.$id.'</a></td>';
        echo '<td><a href="#" ng-click="GoTohtmlstate('.$id.')">'.$RDate.'</a></td>';
      echo '</tr>';

The html file is accessed by an ng-click which transfers the user in to this state and is getting the details of the SQL db row using $http.post method from a js file.

After editing the row of the SQL DB by using the HTML file, I will have to go back to the php file using $state.go. But after returning to the php file, the changes are still not reflecting.

I already tried using

$state.go('phpstate',{}, {reload:'phpstate'});

to refresh the rows displayed but it doesn't really work.


Please check the below code

$state.go($state.current, {}, {reload: true});