shaik irshad sharif shaik irshad sharif - 1 year ago 107
AngularJS Question

Refresh page in redirectTo using $routeprovider

As shown below, I'm trying to reload the whole page with home directory as target url. But only the control is getting loaded instead of reload.
How can I achieve page reload functionality in 'otherwise' instead of just loading a control?

myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
when('/Admin/ConfigPanel', {
templateUrl: '/Admin/ConfigPanel/ManageRoles'
redirectTo: '/Home/Index'


Answer Source

Add target="_self" inside your <a> link

<a href="/Admin/ConfigPanel/ManageRoles" target="_self">Manage Roles</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download