mercredi 23 janvier 2019

EmberJS - How to partially nest parent and sub routes?

I have a lot of nested urls.

e.g. Project list -> Project detail

The Project list template's route should only display the list if the route Project details is not called.

I did it by creating a computed property that check the currentRouteName of the server routing.

Then I add this to my template:

  <div>Element that should be display in both route.</div>

  
    
  
    <ul> ... </ul>
  

Note that some elements of Project list should be still display in Project detail.

Is there a better way to do this?




Aucun commentaire:

Enregistrer un commentaire