cancel
Showing results for 
Search instead for 
Did you mean: 

The difference between attachMatched & attachPatternMatched method in sap.ui.core.routing.Route

Tula
Advisor
Advisor
0 Kudos

Hi all,

I started to learn sapui5 one month ago and am now developing a simple web application. when dealing with routing, I noticed that some are using Router.getRoute("patternname").attachMatched(this._onRouteMatched, this) and others are using Router.getRoute("patternname").attachPatternMatched(this._routePatternMatched, this). Therefore, is there any difference between attachMatched & attachPatternMatched method? Moreover, though I checked the API, I can't see any explicit difference between them.

Do you have any idea? Thank you in advance.

Best regards,

Tula

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor

rout a

   subrout b

if you hit b, the route will fire patternmatched, for the parent route, it will fire matched event

Answers (0)