on 10-07-2015 10:23 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanket,
It is working for me. No error in my console.
Cheers,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.