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

New plugin front-end helper function: navigateByUrl #6451

Open
JohnXLivingston opened this issue Jun 21, 2024 · 0 comments
Open

New plugin front-end helper function: navigateByUrl #6451

JohnXLivingston opened this issue Jun 21, 2024 · 0 comments
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Type: Feature Request ✨

Comments

@JohnXLivingston
Copy link
Contributor

Describe the problem to be solved

If a plugin wants to navigate to another page (for example after having saved something), and uses <a> tag or something like window.location.href = '/p/xxxx', currently the page will reload (despite Peertube is a one-page app).

The correct way to navigate using Angular is something like router.navigateByUrl('/p/xxx'), but plugins don't have access to angular router and angular methods.

Describe the solution you would like

Front-end helpers should include a method to navigate to angular routes. Something like peertubeHelpers.navigateByUrl(url) which could be bind to the associated angular method.

@Chocobozzz Chocobozzz added Type: Feature Request ✨ Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PeerTube Plugin 📦 Features that can be developed in a plugin, but require PeerTube plugin API development Type: Feature Request ✨
Projects
None yet
Development

No branches or pull requests

2 participants