Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setFragment is missing #338

Closed
shtse8 opened this issue Jun 25, 2017 · 3 comments
Closed

setFragment is missing #338

shtse8 opened this issue Jun 25, 2017 · 3 comments

Comments

@shtse8
Copy link

shtse8 commented Jun 25, 2017

as there is setQuery and setSearch, but missing setFragment in the fragment plugin. it is useful when I want to change the value of a fragment, while addFragment can't do it. At the moment, I need to removeFragment and then addFragment to work like setFragment.

@rodneyrehm
Copy link
Member

are you looking for uri.fragment('new-hash')?

@shtse8
Copy link
Author

shtse8 commented Jun 27, 2017

Not exactly. I am looking for setFragment of the Fragment plugin. It woild setting a data in fragment but not setting the whole fragment.

@shtse8
Copy link
Author

shtse8 commented Jun 27, 2017

https://www.domain.com/#?a=1

uri.setFragment("a", 2)

the result will be

https://www.domain.com/#?a=2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants