Skip to content

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

@corali89

Description

@corali89

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions