Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cant see a flash mesage when I created it inside a promise #46

Open
corali89 opened this issue Sep 6, 2016 · 0 comments
Open

I cant see a flash mesage when I created it inside a promise #46

corali89 opened this issue Sep 6, 2016 · 0 comments

Comments

@corali89
Copy link

corali89 commented Sep 6, 2016

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant