Skip to Content
0
Sep 08, 2023 at 04:48 AM

How to avoid triggering attachRouteMatched event if anchor changes

40 Views Last edit Sep 08, 2023 at 05:23 AM 6 rev

hi, all:

I need to monitor the routing change, so i use "attachRoutematched" event. But when anchor changes, the "attachRoutematched" event also be triggered. I want to avoid this behavior, does anyone have solutions?

http://localhost:3000/abc/abc#L43 // the anchor url
oRouter.attachRouteMatched((oEvent) => {

                console.log(oEvent,'oEvent-------');

                this.initRatingFormData();

            })