Cannot correctly refresh page using AngularJS -


i have page, allows user add/edit/delete database table.
database staff, , add/edit/delete, work fine.
however, in angularjs method, add location.reload(), trying refresh page show updated table. unfortunately, database has been updated, page isn't.
if press f5 manually reload, result right. don't use route in page.
want simple function, , can automatically refresh after being updated.

below sample codes

$scope.add = function(){   //add in database   //no problem of part    location.reload() //doesn't work }; 

try adding $ , location service controller

mycontroller($scope, $location){   $scope.add = function(){       $location.reload();  } } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -