anh chị nào rành $route reload giúp em với
-
function thì đã chạy ổn rồi nên e để "........" cho nhanh. chỉ có cái $route.reload() là e ko chạy được. Nếu e dùng $window.location.reload thì chạy được nhưng e muốn sử dụng vì khi refresh trang thì nó ko còn đứng ở tab e đang đứng.
Causes $route service to reload the current route even if $location hasn't changed.
As a result of that, ngView creates new scope and reinstantiates the controller.var app = angular.module('ngRoute']);
app.controller('wizardController', ['$scope', '$http' , '$route' , function($scope, $http, $route) {$scope.updateRoom = function(hotel_id){
...........$http.post("..........").then(function(response){ ........... $route.reload(); }); }
}]);