mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 12:24:55 +00:00
897cdfb596
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 }); } }); ```