Update view without reloading page


#1

After I have changed a variable it doesn’t update the view, if I go to another view and then back again it updates. How can I update the view without reloading the page?


#2

use $apply in this case .


#3

Better would be to stay in the AngularJS digest cycle.


#4

To fully refresh the page without reloading use the following script in your refresh action…

	$scope.refresh = function()
	{
		$ionicHistory.clearCache([$state.current.name]).then(function()
		{
			$state.reload($state.current);
		});
	};

** as i understand your question may be it is best

in case if you want to do something before page loads use the following script in your page enter

$scope.$on("$ionicView.beforeEnter", function(event, data)
{
	//your code here
});

#5

How to do this .share some code.


#6

We can only help you if you post your code. Do you do any http calls with jQuery or something?