fix(router.action): add window.onload handler to parse the initial path from the current url