Skip to content

r-hannuschka/ngx-responsivemenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ngx-Responsivemenu

npm CircleCI Codacy Badge codecov documentation npm

Angular 8+ Responsive Menu


Installation

npm

npm i --save ngx-responsivemenu

Usage

app.module.ts

// App Module
import { ResponsiveMenuModule } from "ngx-responsivemenu";
import { AppComponent } from "./app.component";

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        ResponsiveMenuModule,
    ],
    bootstrap: [
        AppComponent
    ]
})
export class AppModule {
    constructor() { }
}

app.component.ts

// 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 }`);
    }
}

app.component.html

<ngx-responsivemenu>
    <div ngxResponsiveMenuItem *ngFor="let item of items">{{item}}</div>
</ngx-responsivemenu

more Examples

Documentation

Documentation will be auto generated with Compodoc and can found here.

Development

git clone git@github.com:r-hannuschka/ngx-responsivemenu.git
cd ngx-responsivemenu\src && npm i
ng serve

Generate Docs

npm run compodoc

Author

Ralf Hannuschka