Skip to content
Lorenzo D'Ianni edited this page Jul 13, 2017 · 2 revisions

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>
Clone this wiki locally