mercredi 6 mai 2020

How would I get a list of all the routes of my application in Ember.js 3.18?

I am trying to build an automatic navigation.

How would I get a list of all the routes of my application in Ember.js 3.18?

This question was asked 4 years ago and the answers seem outdated and hack-ish.

I have been trying several things. This kind of code gets me the current route name. But that's not what I want: I want an object of all the available routes.

In component JS:

import { inject as service } from '@ember/service';```

export default class navComponent extends Component {
  @service router;
}

In template:




Aucun commentaire:

Enregistrer un commentaire