trigger route function in navigate