node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

ng-sidebarjs

GitHub release npm

ng-sidebarjs

Create mobile sidebar/sidenav experiance in Angular.

Are you looking for a version with AngularJS? Try angular-sidebarjs

npm install ng-sidebarjs --save

Demo

Open the demo on your device and try the touch gestures!

Implementation

Import Module

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
 
import { SidebarJSModule } from 'ng-sidebarjs';
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SidebarJSModule.forRoot()
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }

Create sidebar-js element

Write sidebar-js tag and a trigger element with just [sidebarjsToggle|sidebarjsOpen|sidebarjsClose] attribute.

<div sidebarjsOpen>Open Sidebar!</div>
 
<sidebar-js>
  Hello!
</sidebar-js>