I'm facing an issue while trying to refresh my admin page using Angular. I've come across $window.location.reload()
and $route.reload()
. I attempted to use $window.location.reload()
by injecting $window
into the function parameters.
scope.uploadList = function($window) {
//...
$window.location.href = '/#/admin';
}
However, even after placing it below the success flash message, I keep getting an error message:
Cannot read property `location` of `undefined`.
I'm not sure what steps to take next. I have incorporated this within the directive.