Good day, gentlemen, I have a simple CRUD application, with the ability to add Categories and Phones . I divided the page in two, on the left is the dx-treeview (hereafter: the tree), on the right - the dynamic content, i.e. either all category phones are displayed, or details of one phone selected in the tree : enter image description here

Next, the Datasource at the tree and the table with the phones are different and are located in two different controllers, $ watch and updates the datasource follow the changes in the tree, and the right part of the page changes each time the address changes, here are my routing settings:

myApp.config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/', { templateUrl: "Partials/HomePartial.html", controller: "defaultCtrl" }) .when('/phone/:phoneId', { templateUrl: "Partials/PhoneDetails.html", controller: "phoneDetailsCtrl" }).when('/category/:categoryId', { templateUrl: "Partials/Category.html", controller: "categoryCtrl" }); $routeProvider.otherwise({ redirectTo: '/' }); }]); 

Everything works well, but not with the "Change" elements: enter image description here

Changes take effect on the right only after clicking on any other element in the tree. Here is my source of my local storage of the selected element in the tree:

 myApp.controller('phoneDetailsCtrl', function ($scope, phonesAndCategoriesStorages, $routeParams) { phonesFromFile = []; phonesAndCategoriesStorages.getPhonesFromServer().then(function (response) { phonesFromFile = response; }).then(function () { $scope.localStorragePhone = [phonesAndCategoriesStorages.getPhone($routeParams.phoneId, phonesFromFile)]; }); }); 

I tried to use, immediately after saving the changes, redirect using $ location.path (..) , window.location (..) , window.location.href = ... window.location.replace ..., only window helps .reload , but this is not the case, I do not need a full page reload. Can someone tell me some other way to refresh the page? Thanks in advance for your answers!

1 answer 1

no reloads are needed — they will really restart. install html5 mode and change the link via ng-link. look in google examples this way