Git Product home page Git Product logo

Comments (4)

Sayan751 avatar Sayan751 commented on May 29, 2024

I like this idea. Having this in place, might make the router-lite code a lot cleaner. I think the only case where removing it might cause a problem is where there is a redirectTo configuration with title. I think that in that case, the assumption is to include it in the nav-model.

Even though I am inclined towards removing it from the nav-model in favour of cleaner code. My assumption here is that it is unlikely to encounter numerous routes with redirectTo in a real app. Thus, if those routes are removed from the nav model in router-lite, it might not be too hard for dev to create those navigational links manually.

What do you think @bigopon?

from aurelia.

Sayan751 avatar Sayan751 commented on May 29, 2024

I have prepared the PR. However, I think we should not merge that in a haste. First, let us iron out any remaining issues/question etc.

from aurelia.

elitastic avatar elitastic commented on May 29, 2024

@Sayan751, thanks for your pull request. Unfortunately, it's not possible to deactivate a redirect route in the nav model, as nav is not a valid option of a redirect route:

Error: AUR3557: Unknown redirect route config property: "welcome.routes[0].nav". Only 'path' and 'redirectTo' should be specified for redirects.

That's why it looks more like a bug to me than an interesting idea ;-)

from aurelia.

bigopon avatar bigopon commented on May 29, 2024

I think the only case where removing it might cause a problem is where there is a redirectTo configuration with title. I think that in that case, the assumption is to include it in the nav-model.

Maybe we can also say that it's weird that there are 2 titles for the same route, it'll confuse either the devs or users.

Even though I am inclined towards removing it from the nav-model in favour of cleaner code. My assumption here is that it is unlikely to encounter numerous routes with redirectTo in a real app. Thus, if those routes are removed from the nav model in router-lite, it might not be too hard for dev to create those navigational links manually.

👍

from aurelia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.