Default configuration of SAP Spartacus routing parameters

I defined a routing parameter in the custom module with the following code:

 ConfigModule.withConfig({
      routing: {
        routes: {
          product: {
            paths: [
              'jerrycamera/:manufacturer/:name/:productCode',
              'cameras/:name/:productCode'],
            paramsMapping: {
              name: 'nameForUrl'
            }
          }
        }
      }
    } as RoutingConfig)

However, two parameter mapping entries can be seen in the RoutingConfigService implementation:

The reason is because, in the file C:\Code\SPA\spartacus\projects\storefrontlib\src\cms-structure\routing\default-routing-config.ts, there is a default configuration for product routing:



To get more original articles by Jerry, please follow the public account "Wang Zixi":

Guess you like

Origin blog.csdn.net/i042416/article/details/108623881