feat(demo): add landing page with docs (#1951)

This commit is contained in:
Dmitry Nehaychik 2018-12-26 15:17:57 +03:00 committed by Sergey Andrievskiy
parent 67c9587b87
commit 43cc3a1556
190 changed files with 15425 additions and 21 deletions

View file

@ -0,0 +1,23 @@
import { Component, OnInit } from '@angular/core';
import { NgxMenuService } from '../../../@theme/services/menu.service';
@Component({
selector: 'ngx-components-overview-block',
styleUrls: ['./components-overview-block.component.scss'],
templateUrl: './components-overview-block.component.html',
})
export class NgxComponentsOverviewBlockComponent implements OnInit {
components: { name: string; icon: string; link: string }[];
constructor(private menu: NgxMenuService) {}
ngOnInit() {
this.components = this.menu
.getPreparedMenu('/docs')
.find(({ title }) => title === 'Components')
.children
.slice(1)
.map(({ data: { name, icon, type }, link }) => ({ name, icon, link, group: type === 'group' }));
}
}