angular-flash
angular-flash copied to clipboard
I cant see a flash mesage when I created it inside a promise
I have a lot of promises that are calling to services, depending of the response I want to show a success or a error mesage.. and fot any reason thi does not work... any idea? not working: $scope.approveIt= function(id) { guestService.UpdateAppointmentStatus([id], Enums.GuestStatus.APPROVED) .then(function () { var message = ' Well done! You successfully approved the appointment.'; Flash.create('success', message); },function(error){ var message = ' Something wrong happened...'+error; Flash.create('danger', message); }) };
working: $scope.successAlert = function () { var message = ' Well done! You successfully read this important alert message.'; Flash.create('success', message,0); }