Urlparameter configuration principle of Spartacus UI of SAP e-commerce cloud

Time:2021-12-24

A colleague asked me the following questions:

When Spartacus is started locally, open localhost: 4200, redirect to base site by default, and the URL is automatically changed to:http://localhost:4200/electro…

How to avoid displaying electronics spa / en / USD / after localhost: 4200?

Urlparameter configuration principle of Spartacus UI of SAP e-commerce cloud

In the file projects \ storefrontapp \ SRC \ app \ Spartacus \ spartacus-b2c-configuration module. In TS, the basesite supported by the local Spartacus instance is hard coded in the basesite array

Urlparameters contains the URL that will appear in the browser address bar

If you don’t want these parameters to appear, clear the urlparameters array in line 17 of the above figure.

The final effect is shown in the figure below:

Urlparameter configuration principle of Spartacus UI of SAP e-commerce cloud

More Jerry’s original articles are: “Wang Zixi”:
Urlparameter configuration principle of Spartacus UI of SAP e-commerce cloud