Skip to content

Commit

Permalink
feat: SideMenu to support items template as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Apr 23, 2017
1 parent 838f233 commit 8a49fb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/components/SideMenu/side-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
<span class="selected-endpoint">{{activeItemCaption}}</span>
</span>
</div>
<ng-template #default>
<side-menu-items [items]="menuItems" (activate)="activateAndScroll($event)"></side-menu-items>
</ng-template>

<div #desktop id="resources-nav">
<ul class="menu-root">
<side-menu-items [items]="menuItems" (activate)="activateAndScroll($event)"></side-menu-items>
<div *ngIf="itemsTemplate; else default">
<ng-container *ngTemplateOutlet="itemsTemplate; context: this"></ng-container>
</div>
</ul>
</div>
1 change: 1 addition & 0 deletions lib/components/SideMenu/side-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class SideMenu implements OnInit, OnDestroy {
activeCatCaption: string;
activeItemCaption: string;
menuItems: Array<MenuItem>;
@Input() itemsTemplate;

private options: any;
private $element: any;
Expand Down

0 comments on commit 8a49fb3

Please sign in to comment.