简体   繁体   中英

How to redirect to another page and refresh it in angularjs?

On button click i am calling a function like this

<a href="#" ng-click="submit()">Submit</a>

My controller code is like this

$scope.submit = function(){
    $state.go('app.calendar');
}

This code is taking me to calendar page. But after that page should reload. Can anybody help me..

use this::

$scope.submit = function(){
  $location.path('/calendar'); //need to add the path of calendar page
}

你在找

$state.go('app.calendar', {}, {reload: true})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM