vendredi 10 février 2017

EmberJS: Get all routes paths in an initializer

I created an initializer in my Emberjs app (v2.5) and I would like to have a list of route paths all of my generated routes in the application.

I already tried without any success, I have an error of recognizer is null

initialize(application) {
  var router = application.__container__.lookupFactory('router:main');
  var paths = router.recognizer.names
}

Any suggestions?

Aucun commentaire:

Enregistrer un commentaire