!!!done!!!!
direction change must be triggered before routechangestart event(trigger animation) ---> implement the navigate() function to do this