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
});
}
});
```
|
||
|---|---|---|
| .. | ||
| adapters | ||
| components | ||
| controllers | ||
| helpers | ||
| initializers | ||
| lib | ||
| mixins | ||
| models | ||
| pre-initializers | ||
| raw-views | ||
| routes | ||
| services | ||
| templates | ||
| widgets | ||
| mapping-router.js.es6 | ||