mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 09:43:25 +08:00

THe main advantage of this solution is that it will be called on each rerendered whereas the other is not once href has been set. Example API: ``` api.addNavigationBarItem({ name: "foo", displayName: "Foo", customHref: function(category, args) { const router = api.container.lookup("service:router"); const queryParams = { bar: "1" }; return router.urlFor(router.currentRouteName, category, { queryParams }); } }); ```