question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'toastClass' of undefined

See original GitHub issue

Hi,

I was trying to figure out what causing this error to appear without any success.

TypeError: Cannot read property 'toastClass' of undefined
    at s (/Scripts/angular-toastr.tpls.min.js?cdv=975:1:3620)
    at Z (/Scripts/angular.min.js?cdv=975:70:149)
    at A (/Scripts/angular.min.js?cdv=975:59:203)
    at /Scripts/angular.min.js?cdv=975:66:193
    at /Scripts/angular.min.js?cdv=975:112:20
    at l.$get.l.$eval (/Scripts/angular.min.js?cdv=975:125:305)
    at l.$get.l.$digest (/Scripts/angular.min.js?cdv=975:122:398)
    at l.$get.l.$apply (/Scripts/angular.min.js?cdv=975:126:58)
    at /Scripts/angular.min.js?cdv=975:17:479
    at Object.e [as invoke] (/Scripts/angular.min.js?cdv=975:36:315) <div class="{{toastClass}} {{toastType}}" ng-click="tapToast()">angular.js:11607 (anonymous function)angular.js:8557 $getangular.js:8221 Zangular.js:7729 Aangular.js:7959 (anonymous function)angular.js:13189 (anonymous function)angular.js:14401 $get.l.$evalangular.js:14217 $get.l.$digestangular.js:14506 $get.l.$applyangular.js:1448 (anonymous function)angular.js:4185 eangular.js:1446 dangular.js:1466 tcangular.js:1360 Jdangular.js:26176 (anonymous function)jquery.js?cdv=975:1037 jQuery.Callbacks.firejquery.js?cdv=975:1148 jQuery.Callbacks.self.fireWithjquery.js?cdv=975:433 jQuery.extend.readyjquery.js?cdv=975:103 completed

however the toast appear and disappear correctly and the plugin functioning well.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
anthucommented, Jun 23, 2015

In case someone faces this issue:

If you’re switching from ngToast: remember to remove the <toast></toast> tags from your template file.

That’s what happened to me.

0reactions
palmeranderancommented, Jul 15, 2017

@anthu Thanks, most of the time is a matter of distraction. Removed <toast></toast>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'show' of undefined with $mdToast
2, No need to pass $apply as a dependency,. Try this .controller('MainCtrl', [ '$scope', '$rootScope', '$mdToast','$sce', function($scope, ...
Read more >
Toast - Cannot read properties of undefined (reading &#39
Hello Syncfusion Team,. I am using the syncfusion toast in my angular project and sometimes when I want to show the toast following...
Read more >
Android Show Http Error Code In A Toast - ADocLib
Toast class is used to show notification for a particular interval of time. After sometime it disappears. It doesn't block the user interaction....
Read more >
sitemap.xml - Material Design for Bootstrap
... /general/uncaught-typeerror-cannot-read-property-addeventlistener-of-null/ ... https://mdbootstrap.com/support/angular/bug-toastservice-toastclass-not- ...
Read more >
angular/angular - Gitter
errors.ts:30 ERROR TypeError: Cannot read property 'ɵgetDOM' of undefined ... toastClass: 'alert', hideDelay: alert.duration === undefined ?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found