Angular 8+ Responsive Menu
npm
npm i --save ngx-responsivemenu
// App Module
import { ResponsiveMenuModule } from "ngx-responsivemenu";
import { AppComponent } from "./app.component";
@NgModule({
declarations: [
AppComponent
],
imports: [
ResponsiveMenuModule,
],
bootstrap: [
AppComponent
]
})
export class AppModule {
constructor() { }
}
// AppComponent
import { Component, OnInit } from "@angular/core";
import { OverflowControl, ResponsiveMenuComponent } from "ngx-responsivemenu";
@Component({
selector: "app-component",
templateUrl: "app.component.html",
styleUrls: ["./app.component.scss"],
viewProviders: [OverflowControl]
})
export class SimpleExampleComponent implements OnInit {
public style;
public items: string[] = [];
ngOnInit() {
/** create array with 10 items */
this.items = Array.from( Array.from({length: 10 } ), ( v, index ) => `Item #${ index }`);
}
}
<ngx-responsivemenu>
<div ngxResponsiveMenuItem *ngFor="let item of items">{{item}}</div>
</ngx-responsivemenu
more Examples
Documentation will be auto generated with Compodoc and can found here.
git clone git@github.com:r-hannuschka/ngx-responsivemenu.git
cd ngx-responsivemenu\src && npm i
ng serve
npm run compodoc
Ralf Hannuschka