Angular 6 side bar to added sub child menu not workingAngular pass callback function to child component as @InputAngular2RC4-Primeng Menubar routerlink does not go to my routes after clickDynamic RouterLink href value is changing but router-link is correctwebpack html-loaders lowercase angular 2 built-in directivesDynamic creation of materialize sidenav with dropdown using angular2 does not initialize collapsible dropdownAngular 6 to Add Side Menu Bar is not OpenChild to parent communication in Angular 6Angular Material fixed side bar header not a fixedFilter for child array is not working in Angular 6How to add header sub menu to material-dashboard-angular2 side bar in Angular 6

How much do grades matter for a future academia position?

Mimic lecturing on blackboard, facing audience

Why didn’t Eve recognize the little cockroach as a living organism?

Proving an identity involving cross products and coplanar vectors

Identifying "long and narrow" polygons in with PostGIS

What is the meaning of "You've never met a graph you didn't like?"

Limit max CPU usage SQL SERVER with WSRM

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

Did I make a mistake by ccing email to boss to others?

Do I have to take mana from my deck or hand when tapping a dual land?

Can I cause damage to electrical appliances by unplugging them when they are turned on?

Showing mass murder in a kid's book

How to make money from a browser who sees 5 seconds into the future of any web page?

How do I prevent inappropriate ads from appearing in my game?

Why would five hundred and five be same as one?

Is there a reason to prefer HFS+ over APFS for disk images in High Sierra and/or Mojave?

Is there a RAID 0 Equivalent for RAM?

Anime with legendary swords made from talismans and a man who could change them with a shattered body

El Dorado Word Puzzle II: Videogame Edition

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Typing CO_2 easily

How to make a list of partial sums using forEach

How to test the sharpness of a knife?

What (the heck) is a Super Worm Equinox Moon?



Angular 6 side bar to added sub child menu not working


Angular pass callback function to child component as @InputAngular2RC4-Primeng Menubar routerlink does not go to my routes after clickDynamic RouterLink href value is changing but router-link is correctwebpack html-loaders lowercase angular 2 built-in directivesDynamic creation of materialize sidenav with dropdown using angular2 does not initialize collapsible dropdownAngular 6 to Add Side Menu Bar is not OpenChild to parent communication in Angular 6Angular Material fixed side bar header not a fixedFilter for child array is not working in Angular 6How to add header sub menu to material-dashboard-angular2 side bar in Angular 6













0















Im tried to add My angular project side bar to under the sub menu , but its not working . I used this dashboard template ,
sub menu is not a collapse,
any one know how to fix that issue



Thanks.



This is my code'



sidebar.ts



declare const $: any;
declare interface RouteInfo
path: string;
title: string;
icon: string;
class: string;
children?: any;


export const ROUTES: RouteInfo[] = [
path: '/dashboard', title: 'Dashboard', icon: 'home', class: '',
children: [

path: '/child1', title: 'Child Menu 1', icon: 'home', class: ''

] ,
path: '/class', title: 'Class', icon: 'description', class: '' ,
path: '/student', title: 'Students', icon: 'apps', class: '' ,
path: '/profile', title: 'Profile', icon: 'person', class: '' ,

];

@Component(
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.css']
)
export class SidebarComponent implements OnInit
menuItems: any[];

constructor()

ngOnInit()
this.menuItems = ROUTES.filter(menuItem => menuItem);

isMobileMenu()
if ($(window).width() > 991)
return false;

return true;
;



sidebar.html



<div class="logo">

<div class="logo-img">

</div>


</div>
<div class="sidebar-wrapper" style="margin-top: 2.5rem;">
<div *ngIf="isMobileMenu()">


<ul class="nav navbar-nav nav-mobile-menu">
<li class="nav-item">
<a class="nav-link" href="#pablo">
<i class="material-icons">dashboard</i>
<p>
<span class="d-lg-none d-md-block">Stats</span>
</p>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#pablo" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">notifications</i>
<span class="notification">5</span>
<p>
<span class="d-lg-none d-md-block">Some Actions</span>
</p>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Mike John responded to your email</a>
<a class="dropdown-item" href="#">You have 5 new tasks</a>
<a class="dropdown-item" href="#">You're now friend with Andrew</a>
<a class="dropdown-item" href="#">Another Notification</a>
<a class="dropdown-item" href="#">Another One</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#pablo">
<i class="material-icons">person</i>
<p>
<span class="d-lg-none d-md-block">Account</span>
</p>
</a>
</li>
</ul>
</div>
<ul class="nav">
<li routerLinkActive="active" *ngFor="let menuItem of menuItems" class="menuItem.class nav-item">
<a class="nav-link" [routerLink]="[menuItem.path]">
<i class="material-icons">menuItem.icon</i>
<p>menuItem.title</p>
</a>
<ng-container *ngIf="menuItem.children && menuItem.children.length > 0">
<ul class="nav">
<li routerLinkActive="active" *ngFor="let childmenu of menuItem.children" class="menuItem.class nav-item">
<a class="nav-link" [routerLink]="[childmenu.path]">
<i class="material-icons">childmenu.icon</i>
<p>childmenu.title</p>
</a>
</li>
</ul>
</ng-container>
</li>
</ul>
</div>









share|improve this question


























    0















    Im tried to add My angular project side bar to under the sub menu , but its not working . I used this dashboard template ,
    sub menu is not a collapse,
    any one know how to fix that issue



    Thanks.



    This is my code'



    sidebar.ts



    declare const $: any;
    declare interface RouteInfo
    path: string;
    title: string;
    icon: string;
    class: string;
    children?: any;


    export const ROUTES: RouteInfo[] = [
    path: '/dashboard', title: 'Dashboard', icon: 'home', class: '',
    children: [

    path: '/child1', title: 'Child Menu 1', icon: 'home', class: ''

    ] ,
    path: '/class', title: 'Class', icon: 'description', class: '' ,
    path: '/student', title: 'Students', icon: 'apps', class: '' ,
    path: '/profile', title: 'Profile', icon: 'person', class: '' ,

    ];

    @Component(
    selector: 'app-sidebar',
    templateUrl: './sidebar.component.html',
    styleUrls: ['./sidebar.component.css']
    )
    export class SidebarComponent implements OnInit
    menuItems: any[];

    constructor()

    ngOnInit()
    this.menuItems = ROUTES.filter(menuItem => menuItem);

    isMobileMenu()
    if ($(window).width() > 991)
    return false;

    return true;
    ;



    sidebar.html



    <div class="logo">

    <div class="logo-img">

    </div>


    </div>
    <div class="sidebar-wrapper" style="margin-top: 2.5rem;">
    <div *ngIf="isMobileMenu()">


    <ul class="nav navbar-nav nav-mobile-menu">
    <li class="nav-item">
    <a class="nav-link" href="#pablo">
    <i class="material-icons">dashboard</i>
    <p>
    <span class="d-lg-none d-md-block">Stats</span>
    </p>
    </a>
    </li>
    <li class="nav-item dropdown">
    <a class="nav-link" href="#pablo" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <i class="material-icons">notifications</i>
    <span class="notification">5</span>
    <p>
    <span class="d-lg-none d-md-block">Some Actions</span>
    </p>
    </a>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
    <a class="dropdown-item" href="#">Mike John responded to your email</a>
    <a class="dropdown-item" href="#">You have 5 new tasks</a>
    <a class="dropdown-item" href="#">You're now friend with Andrew</a>
    <a class="dropdown-item" href="#">Another Notification</a>
    <a class="dropdown-item" href="#">Another One</a>
    </div>
    </li>
    <li class="nav-item">
    <a class="nav-link" href="#pablo">
    <i class="material-icons">person</i>
    <p>
    <span class="d-lg-none d-md-block">Account</span>
    </p>
    </a>
    </li>
    </ul>
    </div>
    <ul class="nav">
    <li routerLinkActive="active" *ngFor="let menuItem of menuItems" class="menuItem.class nav-item">
    <a class="nav-link" [routerLink]="[menuItem.path]">
    <i class="material-icons">menuItem.icon</i>
    <p>menuItem.title</p>
    </a>
    <ng-container *ngIf="menuItem.children && menuItem.children.length > 0">
    <ul class="nav">
    <li routerLinkActive="active" *ngFor="let childmenu of menuItem.children" class="menuItem.class nav-item">
    <a class="nav-link" [routerLink]="[childmenu.path]">
    <i class="material-icons">childmenu.icon</i>
    <p>childmenu.title</p>
    </a>
    </li>
    </ul>
    </ng-container>
    </li>
    </ul>
    </div>









    share|improve this question
























      0












      0








      0


      1






      Im tried to add My angular project side bar to under the sub menu , but its not working . I used this dashboard template ,
      sub menu is not a collapse,
      any one know how to fix that issue



      Thanks.



      This is my code'



      sidebar.ts



      declare const $: any;
      declare interface RouteInfo
      path: string;
      title: string;
      icon: string;
      class: string;
      children?: any;


      export const ROUTES: RouteInfo[] = [
      path: '/dashboard', title: 'Dashboard', icon: 'home', class: '',
      children: [

      path: '/child1', title: 'Child Menu 1', icon: 'home', class: ''

      ] ,
      path: '/class', title: 'Class', icon: 'description', class: '' ,
      path: '/student', title: 'Students', icon: 'apps', class: '' ,
      path: '/profile', title: 'Profile', icon: 'person', class: '' ,

      ];

      @Component(
      selector: 'app-sidebar',
      templateUrl: './sidebar.component.html',
      styleUrls: ['./sidebar.component.css']
      )
      export class SidebarComponent implements OnInit
      menuItems: any[];

      constructor()

      ngOnInit()
      this.menuItems = ROUTES.filter(menuItem => menuItem);

      isMobileMenu()
      if ($(window).width() > 991)
      return false;

      return true;
      ;



      sidebar.html



      <div class="logo">

      <div class="logo-img">

      </div>


      </div>
      <div class="sidebar-wrapper" style="margin-top: 2.5rem;">
      <div *ngIf="isMobileMenu()">


      <ul class="nav navbar-nav nav-mobile-menu">
      <li class="nav-item">
      <a class="nav-link" href="#pablo">
      <i class="material-icons">dashboard</i>
      <p>
      <span class="d-lg-none d-md-block">Stats</span>
      </p>
      </a>
      </li>
      <li class="nav-item dropdown">
      <a class="nav-link" href="#pablo" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      <i class="material-icons">notifications</i>
      <span class="notification">5</span>
      <p>
      <span class="d-lg-none d-md-block">Some Actions</span>
      </p>
      </a>
      <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
      <a class="dropdown-item" href="#">Mike John responded to your email</a>
      <a class="dropdown-item" href="#">You have 5 new tasks</a>
      <a class="dropdown-item" href="#">You're now friend with Andrew</a>
      <a class="dropdown-item" href="#">Another Notification</a>
      <a class="dropdown-item" href="#">Another One</a>
      </div>
      </li>
      <li class="nav-item">
      <a class="nav-link" href="#pablo">
      <i class="material-icons">person</i>
      <p>
      <span class="d-lg-none d-md-block">Account</span>
      </p>
      </a>
      </li>
      </ul>
      </div>
      <ul class="nav">
      <li routerLinkActive="active" *ngFor="let menuItem of menuItems" class="menuItem.class nav-item">
      <a class="nav-link" [routerLink]="[menuItem.path]">
      <i class="material-icons">menuItem.icon</i>
      <p>menuItem.title</p>
      </a>
      <ng-container *ngIf="menuItem.children && menuItem.children.length > 0">
      <ul class="nav">
      <li routerLinkActive="active" *ngFor="let childmenu of menuItem.children" class="menuItem.class nav-item">
      <a class="nav-link" [routerLink]="[childmenu.path]">
      <i class="material-icons">childmenu.icon</i>
      <p>childmenu.title</p>
      </a>
      </li>
      </ul>
      </ng-container>
      </li>
      </ul>
      </div>









      share|improve this question














      Im tried to add My angular project side bar to under the sub menu , but its not working . I used this dashboard template ,
      sub menu is not a collapse,
      any one know how to fix that issue



      Thanks.



      This is my code'



      sidebar.ts



      declare const $: any;
      declare interface RouteInfo
      path: string;
      title: string;
      icon: string;
      class: string;
      children?: any;


      export const ROUTES: RouteInfo[] = [
      path: '/dashboard', title: 'Dashboard', icon: 'home', class: '',
      children: [

      path: '/child1', title: 'Child Menu 1', icon: 'home', class: ''

      ] ,
      path: '/class', title: 'Class', icon: 'description', class: '' ,
      path: '/student', title: 'Students', icon: 'apps', class: '' ,
      path: '/profile', title: 'Profile', icon: 'person', class: '' ,

      ];

      @Component(
      selector: 'app-sidebar',
      templateUrl: './sidebar.component.html',
      styleUrls: ['./sidebar.component.css']
      )
      export class SidebarComponent implements OnInit
      menuItems: any[];

      constructor()

      ngOnInit()
      this.menuItems = ROUTES.filter(menuItem => menuItem);

      isMobileMenu()
      if ($(window).width() > 991)
      return false;

      return true;
      ;



      sidebar.html



      <div class="logo">

      <div class="logo-img">

      </div>


      </div>
      <div class="sidebar-wrapper" style="margin-top: 2.5rem;">
      <div *ngIf="isMobileMenu()">


      <ul class="nav navbar-nav nav-mobile-menu">
      <li class="nav-item">
      <a class="nav-link" href="#pablo">
      <i class="material-icons">dashboard</i>
      <p>
      <span class="d-lg-none d-md-block">Stats</span>
      </p>
      </a>
      </li>
      <li class="nav-item dropdown">
      <a class="nav-link" href="#pablo" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      <i class="material-icons">notifications</i>
      <span class="notification">5</span>
      <p>
      <span class="d-lg-none d-md-block">Some Actions</span>
      </p>
      </a>
      <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
      <a class="dropdown-item" href="#">Mike John responded to your email</a>
      <a class="dropdown-item" href="#">You have 5 new tasks</a>
      <a class="dropdown-item" href="#">You're now friend with Andrew</a>
      <a class="dropdown-item" href="#">Another Notification</a>
      <a class="dropdown-item" href="#">Another One</a>
      </div>
      </li>
      <li class="nav-item">
      <a class="nav-link" href="#pablo">
      <i class="material-icons">person</i>
      <p>
      <span class="d-lg-none d-md-block">Account</span>
      </p>
      </a>
      </li>
      </ul>
      </div>
      <ul class="nav">
      <li routerLinkActive="active" *ngFor="let menuItem of menuItems" class="menuItem.class nav-item">
      <a class="nav-link" [routerLink]="[menuItem.path]">
      <i class="material-icons">menuItem.icon</i>
      <p>menuItem.title</p>
      </a>
      <ng-container *ngIf="menuItem.children && menuItem.children.length > 0">
      <ul class="nav">
      <li routerLinkActive="active" *ngFor="let childmenu of menuItem.children" class="menuItem.class nav-item">
      <a class="nav-link" [routerLink]="[childmenu.path]">
      <i class="material-icons">childmenu.icon</i>
      <p>childmenu.title</p>
      </a>
      </li>
      </ul>
      </ng-container>
      </li>
      </ul>
      </div>






      angular angular6






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 3:17









      core114core114

      1,68352757




      1,68352757






















          0






          active

          oldest

          votes











          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%2f55035521%2fangular-6-side-bar-to-added-sub-child-menu-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f55035521%2fangular-6-side-bar-to-added-sub-child-menu-not-working%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

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко