Fetches this given URL with JavaScript and replaces the current layer's main element with a matching fragment from the server response.
This would replace the current page with the response for /users
:
up.visit('/users')
The URL to visit.
Additional render options to use for rendering the destination URL.
Most options for up.render()
may be used.
A promise that fulfills with an up.RenderResult
once the page has been updated.
The promise rejects when one of the following conditions occur:
See Render lifecycle hooks for more information about handling errors, or running code after rendering.