VMware {code} Community
fusp
Contributor
Contributor

Http 404 error when right click and select "Reload frame"

Hi,

We developed a vsphere HTML client plug-in following vmware sample,  and found an issue. For Chrome, when right click on the plug-in page and select "Reload frame", 404 error happens; For IE, it's also the same when right click and select "Refresh". Attached is the screenshot of test result with vmware sample plug-in in the SDK. Can you advise how to resolve this? tks.

Reply
0 Kudos
2 Replies
Plam_Dimitrov
VMware Employee
VMware Employee

Hello,

This is expected behaviour as the "/ui/html-sample/welcome" resource does not exist on the server. The initial URL when opening the Welcome view of the sample points the index.html page with some parameters (/ui/html-sample/index.html?view=welcome). After Angular bootstraps we instruct it to load the correct view based on the "view" query parameter, then Angular changes the URL to "/ui/html-sample/welcome" using the HTML5 History API (https://codecraft.tv/courses/angular/routing/routing-strategies/#_pathlocationstrategy) . A simple way to overcome this issue is to change the Angular Routing Strategy to HashLocationStrategy (https://codecraft.tv/courses/angular/routing/routing-strategies/#_hashlocationstrategy).

Reply
0 Kudos
fusp
Contributor
Contributor

Thanks for the information, i will have a try.

Reply
0 Kudos