angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Feature Request: optional url-less auxiliary routes #441

Open mantissa7 opened 5 years ago

mantissa7 commented 5 years ago

I have a situation where I have a series of routes, where each route has two components: a Hero component and a Page component. These never change independently of each other, and therefore never need the funky parentheses url.

<div>
    <div id="hero">
        <app-logo></app-logo>
        <nav>...</nav>
        <div>
            <router-outlet name="hero"></router-outlet>
        </div>
    </div>
    <div id="page">
            <router-outlet></router-outlet>
    </div>
</div>

Both outlets are always loaded and hero cannot be loaded via route.data as it contains buttons and forms and events etc. In this case http://url.com/page1 would always load both components, therefore http://url.com/page1(hero:component) is redundant.

I would like to suggest the ability to load a series of named outlets without needing the URL to change.