[英]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})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.