简体   繁体   中英

AngularJS Toastr fadeIn fadeOut

i have a service code like ;

<script>
var pop = function (type, message, callbackfn,duration) {
        toaster.pop({
            type: type,
            body: message,
            showCloseButton: true,
            timeout: duration,
            positionClass: "toast-top-full-width",
            onHideCallback: callbackfn,
            hideDuration : 1000,
            hideMethod: 'slideUp'
        });

</script>

but my toaster is not fading in or fading out. My AngularJS toastr version is : 0.4.15 which option should i add in pop method to get fadeOut feature ?

I'm not familiar with the Angular port, but the original can be played with here . This would suggest the properties your concerned with are:

  • "showMethod": "fadeIn"
  • "hideMethod": "fadeOut"
  • "showDuration": "300"
  • "hideDuration": "3000"
  • "timeOut": "2000"

    1. Is your toast showing at all?

    2. Have you confirmed that your type, message, and duration variables are populated at the point of calling?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM