Angular 6 Sibling Routing (for a sidebar)Angular2 multiple router-outlet in the same templateAngular 2 - Submodule routing and nested <router-outlet>Angular 2 - named router-outlet routing in submoduleHow to inject routes to external angular moduleAngular 5 Multi level Child routes with Named router outletsAngular 5 child route getting loaded at root Level router-outlet when using loadchildren in routingAngular 5: Cannot match any routesAngular 2+ sliding sidebar outside router outletAngular 6: How can I route to both component & featureModule at the same time?Angular (6) Change secondary child route without changing parent primary outletHow to provide multiple router outlet in a template with same path?

Is there a standard name for this relation property : " aRb --> there is no c different from b such that aRc "?

Replacement stem cap and bolt

Is it legal to have an abortion in another state or abroad?

Why is the Eisenstein ideal paper so great?

Can we assume that a hash function with high collision resistance also means highly uniform distribution?

What does kpsewhich stand for?

Non-containing subsets of two sizes

Can my floppy disk still work without a shutter spring?

Why did it take so long for Germany to allow electric scooters / e-rollers on the roads?

Is there a context where the expression `a.b::c` makes sense?

Is it legal to meet with potential future employers in the UK, whilst visiting from the USA

How do I superimpose two math symbols?

Can I tell a prospective employee that everyone in the team is leaving?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

My players want to grind XP but we're using landmark advancement

Expected maximum number of unpaired socks

When playing Edgar Markov, what is the definition of a "Vampire spell"?

Can a character with the War Caster feat call a bolt with Call Lightning instead of making an opportunity attack?

Mercedes C180 (W204) dash symbol

Beginner looking to learn/master musical theory and instrumental ability. Where should I begin?

Which European Languages are not Indo-European?

Find this cartoon

What is the use case for non-breathable waterproof pants?

How to patch glass cuts in a bicycle tire?



Angular 6 Sibling Routing (for a sidebar)


Angular2 multiple router-outlet in the same templateAngular 2 - Submodule routing and nested <router-outlet>Angular 2 - named router-outlet routing in submoduleHow to inject routes to external angular moduleAngular 5 Multi level Child routes with Named router outletsAngular 5 child route getting loaded at root Level router-outlet when using loadchildren in routingAngular 5: Cannot match any routesAngular 2+ sliding sidebar outside router outletAngular 6: How can I route to both component & featureModule at the same time?Angular (6) Change secondary child route without changing parent primary outletHow to provide multiple router outlet in a template with same path?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to implement routing functionality onto my Angular application, with partial success. Routing works on the main container of my application (the paths, without an outlet property).



The problem I am having is that I am trying to implement a second router outlet for a sidebar (paths with the outlet property called 'sidebar'). It isn't working.



The paths I have are as follows:



 const appRoutes: Routes = [
path: '', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'workspace', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'reports', component: ReportsAreaComponent, children: [
path: '', component: ActiveProjectStatisticsComponent ,
path: 'active-project-stats', component: ActiveProjectStatisticsComponent ,
path: 'productivity-tracking', component: ProductivityTrackingComponent ,
] ,
path: 'templates', component: TemplatesAreaComponent, children: [
path: '', component: TemplateSectionsComponent ,
path: 'email', component: TemplateEmailComponent
] ,
path: '', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'templates', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'reports', component: ReportsComponent, outlet: 'sidebar'
];


The component for the main container looks as follows:



<div class="mainContainer">
<router-outlet></router-outlet>
</div>


The component for the sidebar looks as follows:



<div class="asideBox">
<router-outlet name="sidebar"></router-outlet>
</div>


The parent component template containing both of them is as follows:



<app-header></app-header>
<div class="bodyContainer">
<div *ngIf="!isOrganiserPage; else organiserPane" class="flexResponsive768">
<aside class="width20">
<!-- SIDEBAR COMPONENT -->
<app-sidebar></app-sidebar>
</aside>
<!-- MAIN COMPONENT -->
<main class="width80" app-main-pane>

</main>
</div>
<ng-template #organiserPane>
<main></main>
</ng-template>
</div>
<app-right-pane></app-right-pane>
<app-modals></app-modals>


Can somebody please help me with this issue? I've tried going on tutorials to solve this, but I haven't gotten much luck.



Thanks.










share|improve this question






















  • did you check stackoverflow.com/questions/34628848/…

    – Akber Iqbal
    Mar 24 at 3:03

















0















I am trying to implement routing functionality onto my Angular application, with partial success. Routing works on the main container of my application (the paths, without an outlet property).



The problem I am having is that I am trying to implement a second router outlet for a sidebar (paths with the outlet property called 'sidebar'). It isn't working.



The paths I have are as follows:



 const appRoutes: Routes = [
path: '', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'workspace', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'reports', component: ReportsAreaComponent, children: [
path: '', component: ActiveProjectStatisticsComponent ,
path: 'active-project-stats', component: ActiveProjectStatisticsComponent ,
path: 'productivity-tracking', component: ProductivityTrackingComponent ,
] ,
path: 'templates', component: TemplatesAreaComponent, children: [
path: '', component: TemplateSectionsComponent ,
path: 'email', component: TemplateEmailComponent
] ,
path: '', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'templates', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'reports', component: ReportsComponent, outlet: 'sidebar'
];


The component for the main container looks as follows:



<div class="mainContainer">
<router-outlet></router-outlet>
</div>


The component for the sidebar looks as follows:



<div class="asideBox">
<router-outlet name="sidebar"></router-outlet>
</div>


The parent component template containing both of them is as follows:



<app-header></app-header>
<div class="bodyContainer">
<div *ngIf="!isOrganiserPage; else organiserPane" class="flexResponsive768">
<aside class="width20">
<!-- SIDEBAR COMPONENT -->
<app-sidebar></app-sidebar>
</aside>
<!-- MAIN COMPONENT -->
<main class="width80" app-main-pane>

</main>
</div>
<ng-template #organiserPane>
<main></main>
</ng-template>
</div>
<app-right-pane></app-right-pane>
<app-modals></app-modals>


Can somebody please help me with this issue? I've tried going on tutorials to solve this, but I haven't gotten much luck.



Thanks.










share|improve this question






















  • did you check stackoverflow.com/questions/34628848/…

    – Akber Iqbal
    Mar 24 at 3:03













0












0








0








I am trying to implement routing functionality onto my Angular application, with partial success. Routing works on the main container of my application (the paths, without an outlet property).



The problem I am having is that I am trying to implement a second router outlet for a sidebar (paths with the outlet property called 'sidebar'). It isn't working.



The paths I have are as follows:



 const appRoutes: Routes = [
path: '', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'workspace', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'reports', component: ReportsAreaComponent, children: [
path: '', component: ActiveProjectStatisticsComponent ,
path: 'active-project-stats', component: ActiveProjectStatisticsComponent ,
path: 'productivity-tracking', component: ProductivityTrackingComponent ,
] ,
path: 'templates', component: TemplatesAreaComponent, children: [
path: '', component: TemplateSectionsComponent ,
path: 'email', component: TemplateEmailComponent
] ,
path: '', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'templates', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'reports', component: ReportsComponent, outlet: 'sidebar'
];


The component for the main container looks as follows:



<div class="mainContainer">
<router-outlet></router-outlet>
</div>


The component for the sidebar looks as follows:



<div class="asideBox">
<router-outlet name="sidebar"></router-outlet>
</div>


The parent component template containing both of them is as follows:



<app-header></app-header>
<div class="bodyContainer">
<div *ngIf="!isOrganiserPage; else organiserPane" class="flexResponsive768">
<aside class="width20">
<!-- SIDEBAR COMPONENT -->
<app-sidebar></app-sidebar>
</aside>
<!-- MAIN COMPONENT -->
<main class="width80" app-main-pane>

</main>
</div>
<ng-template #organiserPane>
<main></main>
</ng-template>
</div>
<app-right-pane></app-right-pane>
<app-modals></app-modals>


Can somebody please help me with this issue? I've tried going on tutorials to solve this, but I haven't gotten much luck.



Thanks.










share|improve this question














I am trying to implement routing functionality onto my Angular application, with partial success. Routing works on the main container of my application (the paths, without an outlet property).



The problem I am having is that I am trying to implement a second router outlet for a sidebar (paths with the outlet property called 'sidebar'). It isn't working.



The paths I have are as follows:



 const appRoutes: Routes = [
path: '', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'workspace', component: WorkspaceAreaComponent , // localhost:4200/workspace
path: 'reports', component: ReportsAreaComponent, children: [
path: '', component: ActiveProjectStatisticsComponent ,
path: 'active-project-stats', component: ActiveProjectStatisticsComponent ,
path: 'productivity-tracking', component: ProductivityTrackingComponent ,
] ,
path: 'templates', component: TemplatesAreaComponent, children: [
path: '', component: TemplateSectionsComponent ,
path: 'email', component: TemplateEmailComponent
] ,
path: '', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'templates', component: TemplatesComponent, outlet: 'sidebar' ,
path: 'reports', component: ReportsComponent, outlet: 'sidebar'
];


The component for the main container looks as follows:



<div class="mainContainer">
<router-outlet></router-outlet>
</div>


The component for the sidebar looks as follows:



<div class="asideBox">
<router-outlet name="sidebar"></router-outlet>
</div>


The parent component template containing both of them is as follows:



<app-header></app-header>
<div class="bodyContainer">
<div *ngIf="!isOrganiserPage; else organiserPane" class="flexResponsive768">
<aside class="width20">
<!-- SIDEBAR COMPONENT -->
<app-sidebar></app-sidebar>
</aside>
<!-- MAIN COMPONENT -->
<main class="width80" app-main-pane>

</main>
</div>
<ng-template #organiserPane>
<main></main>
</ng-template>
</div>
<app-right-pane></app-right-pane>
<app-modals></app-modals>


Can somebody please help me with this issue? I've tried going on tutorials to solve this, but I haven't gotten much luck.



Thanks.







angular angular2-routing angular-routing angular-template router-outlet






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 0:22









Chosen1Chosen1

83211




83211












  • did you check stackoverflow.com/questions/34628848/…

    – Akber Iqbal
    Mar 24 at 3:03

















  • did you check stackoverflow.com/questions/34628848/…

    – Akber Iqbal
    Mar 24 at 3:03
















did you check stackoverflow.com/questions/34628848/…

– Akber Iqbal
Mar 24 at 3:03





did you check stackoverflow.com/questions/34628848/…

– Akber Iqbal
Mar 24 at 3:03












1 Answer
1






active

oldest

votes


















0














I just found the answer to my own question.



The paths themselves were fine, it was the router link that needed changing.



I changed it from this:



<div class="mainMenu flex">
<a routerLink="organiser" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
<a routerLink="workspace" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
<a routerLink="reports" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
<a routerLink="templates" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
</div>


to this:



<div class="mainMenu flex">
<a [routerLink]="[ outlets: sidebar: ['organiser'] ]" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
<a [routerLink]="[ outlets: sidebar: ['workspace'] ]" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
<a [routerLink]="[ outlets: sidebar: ['reports'] ]" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
<a [routerLink]="[ outlets: sidebar: ['templates'] ]" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
</div>


And it all works fine. Thanks to nobody else but me for finding out the answer!






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319624%2fangular-6-sibling-routing-for-a-sidebar%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I just found the answer to my own question.



    The paths themselves were fine, it was the router link that needed changing.



    I changed it from this:



    <div class="mainMenu flex">
    <a routerLink="organiser" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
    <a routerLink="workspace" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
    <a routerLink="reports" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
    <a routerLink="templates" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
    </div>


    to this:



    <div class="mainMenu flex">
    <a [routerLink]="[ outlets: sidebar: ['organiser'] ]" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
    <a [routerLink]="[ outlets: sidebar: ['workspace'] ]" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
    <a [routerLink]="[ outlets: sidebar: ['reports'] ]" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
    <a [routerLink]="[ outlets: sidebar: ['templates'] ]" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
    </div>


    And it all works fine. Thanks to nobody else but me for finding out the answer!






    share|improve this answer



























      0














      I just found the answer to my own question.



      The paths themselves were fine, it was the router link that needed changing.



      I changed it from this:



      <div class="mainMenu flex">
      <a routerLink="organiser" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
      <a routerLink="workspace" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
      <a routerLink="reports" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
      <a routerLink="templates" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
      </div>


      to this:



      <div class="mainMenu flex">
      <a [routerLink]="[ outlets: sidebar: ['organiser'] ]" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
      <a [routerLink]="[ outlets: sidebar: ['workspace'] ]" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
      <a [routerLink]="[ outlets: sidebar: ['reports'] ]" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
      <a [routerLink]="[ outlets: sidebar: ['templates'] ]" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
      </div>


      And it all works fine. Thanks to nobody else but me for finding out the answer!






      share|improve this answer

























        0












        0








        0







        I just found the answer to my own question.



        The paths themselves were fine, it was the router link that needed changing.



        I changed it from this:



        <div class="mainMenu flex">
        <a routerLink="organiser" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
        <a routerLink="workspace" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
        <a routerLink="reports" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
        <a routerLink="templates" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
        </div>


        to this:



        <div class="mainMenu flex">
        <a [routerLink]="[ outlets: sidebar: ['organiser'] ]" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
        <a [routerLink]="[ outlets: sidebar: ['workspace'] ]" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
        <a [routerLink]="[ outlets: sidebar: ['reports'] ]" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
        <a [routerLink]="[ outlets: sidebar: ['templates'] ]" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
        </div>


        And it all works fine. Thanks to nobody else but me for finding out the answer!






        share|improve this answer













        I just found the answer to my own question.



        The paths themselves were fine, it was the router link that needed changing.



        I changed it from this:



        <div class="mainMenu flex">
        <a routerLink="organiser" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
        <a routerLink="workspace" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
        <a routerLink="reports" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
        <a routerLink="templates" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
        </div>


        to this:



        <div class="mainMenu flex">
        <a [routerLink]="[ outlets: sidebar: ['organiser'] ]" class="item" [ngClass]="organiserTabActive ? 'active' : ''" (click)="onClick(1)">ORGANISER</a>
        <a [routerLink]="[ outlets: sidebar: ['workspace'] ]" class="item" [ngClass]="workspaceTabActive ? 'active' : ''" (click)="onClick(2)">WORKSPACE</a>
        <a [routerLink]="[ outlets: sidebar: ['reports'] ]" class="item" [ngClass]="reportsTabActive ? 'active' : ''" (click)="onClick(3)">REPORTS</a>
        <a [routerLink]="[ outlets: sidebar: ['templates'] ]" class="item" [ngClass]="templatesTabActive ? 'active' : ''" (click)="onClick(4)">TEMPLATES</a>
        </div>


        And it all works fine. Thanks to nobody else but me for finding out the answer!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 13:30









        Chosen1Chosen1

        83211




        83211





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319624%2fangular-6-sibling-routing-for-a-sidebar%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해