none
Angular 8 SideNAV to load same component with parameter RRS feed

  • Question

  • I have component SideNavbar like below and both links are pointing to another component Page1. But both Side1 & Side2 are invoking same Page1 component. My requirement is on click of Side1 need to pass some parameter to component Page1 and display some grid data and on click of Side2 again load the same component Page1 and pass the parameter to component and load the same grid with different data. Please let me know how to invoke the same Page1 component method from SideNav component Side1 & Side2 click.

    SideNavBar component:

    <a routerLink="/Page1" [routerLinkActive]="['router-link-active']" class="list-group-item"><i class="fa fa-calendar-plus-o"></i>&nbsp;<span>{{ 'Side1'}}</span></a>

    <a [routerLink]="['/Page1']" [routerLinkActive]="['router-link-active']" class="list-group-item"><i class="fa fa-calendar"></i>&nbsp;<span>{{ 'Side2'}}</span></a>

    Tuesday, January 7, 2020 7:15 AM

All replies

  • Hi friend,

    Welcome to MSDN forum.

    According to your description, I think your issue is more related to Angular 8, since our forum discusses about the usage of tools and editors in Visual Studio, I suggest you could redirect to Stack Overflow tagged angular8 or Stack Overflow tagged sidenav, and start a new thread there to seek for a more professional help.

    Sorry for any inconvenience and thanks for your understanding.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 8, 2020 2:44 AM