Skip to content

Navigation: Improve .push() and introduce .replace() method #148

Description

@bugii

Resources:
Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

+-- @stencil/core@2.19.3                                        
+-- @stencil/sass@2.0.0                                         
| `-- @stencil/core@2.19.3 deduped                              
`-- stencil-router-v2@0.6.0                                     
  +-- @stencil/core@2.19.3 deduped                              
  `-- @stencil/store@1.5.0                                      
    `-- @stencil/core@2.19.3 deduped

I'm submitting a ... (check one with "x")
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:
There is currently 1 supported way to programmatically navigate to another route: Router.push(url: string).

Expected behavior:
history.pushState accepts a state object as the first argument. It would be very helpful if Router.push() accepted a second (optional) argument for that purpose.
Furthermore, it would be great if the library supported not only pushState, but also history.replaceState, e.g. Router.replace(). This is currently a blocker for us to move to this library.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions