I have an Angular 1.3 project, using ng-route. I am using Angular Toastr for user notifications.
After the notification closes, I want to send the user to a path.
With the following code, the even fires my function and displays the debug statement, but the browser does not navigate and no errors are shown. What did I miss?
$scope.sendUsername = function() {
if ($scope.myForm.$valid) {
toastr.success('We sent an email to (email address)', {
onHidden: function() {
$log.debug('foo');
$location.path('/');
}
});
}
};