TypeError: Cannot read property 'toastClass' of undefined
See original GitHub issueHi,
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:
- Created 8 years ago
- Comments:6 (2 by maintainers)
Top 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 '
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
@anthu Thanks, most of the time is a matter of distraction. Removed
<toast></toast>