当我们在sapui5中可以通过正常路由实现时,子路由的作用是什么

What is the purpose of subroutes when we can achieve through normal routes in sapui5

在 SAPUI5 中使用子路径有什么具体原因吗?

 {
                       pattern: "album/{catIndex}",
                       name: "songs",
                       view: "songlist",
                       viewLevel : 3,
                       targetAggregation: "masterPages" ,
                       subroutes: [
                                   {
                                       pattern: "category/{catIndex}/subcat/{subCatIndex}",
                                       name: "Products",
                                       view: "songdetails",
                                       viewLevel : 4,
                                       targetAggregation: "detailPages",
                                   }]
                   }

这里我使用了子路径,以获取从路径到子路径的模型范围。

只要看看文档:如果命中子路由,它将为其所有父路由触发 routeMatched 事件。 routePatternMatched 事件只会为子路由而不是父路由触发。路由也会显示子路由的所有目标及其父路由。