Closed tomaszkubacki closed 10 years ago
You should always have the more specific route first, which would solve your problem.
router.root
..addRoute(name: "bookings", path: "/bookings", enter: bookingList)
..addRoute(name: "book", path: "/book", enter: book);
@pavelgj - this will work - however it still matches 'book' route for 'bookings' (and logs error)
I wouldn't worry about the warning. I will probably demote it to a "fine" log message instead. This is the correct behavior -- router picks the first matching route.
eg.
router.root.addRoute(name: "book", path: "/book", enter: book ); router.root.addRoute(name: "bookings", path: "/bookings", enter: bookingList );
then go to /bookings causes: log: More than one route matches /bookings [[Route: book], [Route: bookings]]