use closure, not query parameter, when switching page