cancel
Showing results for 
Search instead for 
Did you mean: 

Shopping cart issue

sanketchimalwar
Participant
0 Kudos

Hi,

I was trying to build the shopping cart application from this video. I did exactly same as mentioned in the video. Created all the file ( component.js / common.js ) as mentioned. But when i try to run it as web app preview it doesn't work.

In chrome , developer tools i tried to check what is the error. Here is a screen shot of what i get.

"Uncaught Error: failed to load 'sap/demo/cart/Component.js' from ./Component.js: SyntaxError: Unexpected identifier"

Here is how my index.html looks like

Here is how my component.js looks like

I have also created an empty Component-preload.js file. I also tried to check the comments mentioned is some other posts like the SAPUI5 version ( 1.30.9 ) . I am using eclipse luna .I hope that it doesn't have anything to do with Luna. I have even tried this link on scn

But i am not able to run the shopping cart. Can someone help me with what can be the problem ? I have attached my index.htm and component.js files.

Thanks in advance

Best regards

Sanket

Accepted Solutions (1)

Accepted Solutions (1)

karthikarjun
Active Contributor
0 Kudos

Hi Sanket,

Two errors in your component.js.

It is return oView;

and this.getRouter();


1. But in your code you wrote retrun oView; ( spelling mistake )

2. getrouter()

Change this two mistakes in your code.

Thanks,

Karthik A

sanketchimalwar
Participant
0 Kudos

Thanks ...

Yes that was one of the problem. Now it is working

Sanket

Answers (1)

Answers (1)

karthikarjun
Active Contributor
0 Kudos

Hi Sanket,

It is working for me. No error in my console.

Cheers,

Karthik A