Code Monkey home page Code Monkey logo

Comments (5)

tarsil avatar tarsil commented on August 25, 2024

@harshalizode in the docs, it's explicitly said that if you want to do the include for all in one, in theory you should to a nested include, in your case you have 2 includes trying to reach the "/" + the the URLs from the namespace.

What is happening? So now you have the accounts and the employee apps (includes), both in the including without a path, which means it will default to "/".

Since Esmerald like everything, uses regex for the routes, as per docs, it will be a first found. Since both Includes have the same path, the accounts include is ignored.

Advice? If you want both accounts and employees to be under the "/", make those includes to be inside a main Include (nested includes) or give a different path to both includes like "/accounts" and "/employees".

from esmerald.

harshalizode avatar harshalizode commented on August 25, 2024

@tarsil can we includes more than 1 apps under "/" with the nested include?
As per the documentation They have includes for the same app urls.
Can you provide the example for this?

from esmerald.

tarsil avatar tarsil commented on August 25, 2024

@harshalizode literally from this section where the warning was also mentioned:

https://esmerald.dev/routing/routes/?h=nested+includes#application-routes

from esmerald.

tarsil avatar tarsil commented on August 25, 2024

@tarsil can we includes more than 1 apps under "/" with the nested include? As per the documentation They have includes for the same app urls. Can you provide the example for this?

As you can see, @harshalizode the routing behaves as expected, because internally Esmerald uses a regex to match the routes, you need to be careful the way the routes are assembled, usually, if you want to point to "/", that should be the last one. This is common in almost every framework.

from esmerald.

harshalizode avatar harshalizode commented on August 25, 2024

Okay, Thank you.

from esmerald.

Related Issues (7)

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.