We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting Runtime error : Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null

Thread ID:

Created:

Updated:

Platform:

Replies:

143244 Mar 11,2019 02:30 PM UTC Mar 12,2019 10:55 AM UTC Ionic 1
loading
Tags: General
Swati Dubey
Asked On March 11, 2019 02:30 PM UTC

Goal
   I was creating a dishdetailpage of each dish on the menu page of my app , which is opend on clicking the image of each dish .

What I was getting?
 When on clicking the image of a dish on menu page , it is opening the dishdetail page with the error as follows --
Runtime Error
Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null at http://localhost:8100/build/main.js:128:81 at Array.forEach (<anonymous>) at new DishdetailPage (http://localhost:8100/build/main.js:128:28) at createClass (http://localhost:8100/build/vendor.js:12859:20) at createDirectiveInstance (http://localhost:8100/build/vendor.js:12700:37) at createViewNodes (http://localhost:8100/build/vendor.js:14158:53) at createRootView (http://localhost:8100/build/vendor.js:14047:5) at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42) at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/vendor.js:14755:12) at ComponentFactory_.create (http://localhost:8100/build/vendor.js:11652:46)
Stack
Error: Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null at http://localhost:8100/build/main.js:128:81 at Array.forEach (<anonymous>) at new DishdetailPage (http://localhost:8100/build/main.js:128:28) at createClass (http://localhost:8100/build/vendor.js:12859:20) at createDirectiveInstance (http://localhost:8100/build/vendor.js:12700:37) at createViewNodes (http://localhost:8100/build/vendor.js:14158:53) at createRootView (http://localhost:8100/build/vendor.js:14047:5) at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42) at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/vendor.js:14755:12) at ComponentFactory_.create (http://localhost:8100/build/vendor.js:11652:46) at c (http://localhost:8100/build/polyfills.js:3:19752) at Object.reject (http://localhost:8100/build/polyfills.js:3:19174) at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:54636:16) at NavControllerBase._failed (http://localhost:8100/build/vendor.js:54629:14) at http://localhost:8100/build/vendor.js:54676:59 at t.invoke (http://localhost:8100/build/polyfills.js:3:14976) at Object.onInvoke (http://localhost:8100/build/vendor.js:5134:33) at t.invoke (http://localhost:8100/build/polyfills.js:3:14916) at r.run (http://localhost:8100/build/polyfills.js:3:10143) at http://localhost:8100/build/polyfills.js:3:20242
Why am I getting this error and how to fix this?







Attachment: error_904cf8fd.zip

Deepa Loganathan [Syncfusion]
Replied On March 12, 2019 10:55 AM UTC

Hi Swati,  
 
We have checked the reported issue and the issue would usually occur when you were trying to access the property of an object that is not initialized. 
 
We have checked to see that you have initialized the property “comments” with the navigation parameters and so we suspect the issue was because the navigation parameters were not received properly in the component. So please check to see if there exist any issues in passing navigation parameters in routing to the “dishdetail” page.  
 
Regards,  
Deepa L. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;