cancel
Showing results for 
Search instead for 
Did you mean: 

Demo.controller.js:24 Uncaught TypeError: Cannot read property 'getResourceBundle' of undefined

0 Kudos

I have included the Resource Model in manifest.json and I am referring to that resource in Controller. I am facing Demo.controller.js:24 Uncaught TypeError: Cannot read property 'getResourceBundle' of undefined.

manifest.json...

controller

logs...

View Entire Topic
harsharya1011
Newcomer
0 Kudos

Hi,

I also get the same error in my code and when I added these line of code in my manifest.json file.It worked properly. So, I advice try to add these below lines of code while defining model in your manifest.json. 

 
"models": {
        "i18n": {
          "type": "sap.ui.model.resource.ResourceModel",
          "settings": {
            "bundleName": "i18n/i18n.properties"
          },
          "uri": "sap.ui.demo.i18n.i18n.properties",
          "preload": true
        }
 
Thanks & Regards
Harsh Arya