mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:02:48 +08: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 }); } }); ``` |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |