cancel
Showing results for 
Search instead for 
Did you mean: 

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

11-28-2018 6:45 AM
1127 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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...

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor
0 Likes

Your model i8n model is not instantiated, please check where you are creating the i18n model(Component or manifest.json) and see the code is written correctly there.

BR,

Mahesh

Answers (1)

Answers (1)

harsharya1011
Newcomer
0 Likes

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