14.0.0 • Published 1 year ago

ng-sidebarjs v14.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
1 year ago

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!

Options

<sidebarjs-element
  // Optional | Required only for multiple sidebarjs
  [sidebarjsName]="'myCustomName'"
  
  // Optional
  [sidebarjsConfig]="{
    // Check https://github.com/SidebarJS/sidebarjs#options for all available options
  }"
  
  // Optional | Function called after sidebar is open
  (open)="onOpenSidebar()"
  
  // Optional | Function called after sidebar is close
  (close)="onCloseSidebar()"
  
  // Optional | Function called when sidebar change visibility
  (changeVisibility)="onChangeVisibility($event)">
</sidebarjs-element>

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 sidebarjs-element

Write sidebarjs-element tag and a trigger element with just sidebarjsToggle|sidebarjsOpen|sidebarjsClose attribute.

<div sidebarjsOpen>Open Sidebar!</div>

<sidebarjs-element>
  Hello!
</sidebarjs-element>

Migrate from <=4.0.0 to 6.0.0

Naming convention become consistent: everything that was SidebarJSName, now is SidebarjsName.

<=4.0.06.0.0
SidebarJSModuleSidebarjsModule
SidebarJSServiceSidebarjsService
\<sidebar-js>\<sidebarjs-element>
sidebarjsOpensidebarjsOpen
sidebarjsClosesidebarjsClose
sidebarjsTogglesidebarjsToggle
14.0.0

1 year ago

13.0.0

1 year ago

11.0.2

1 year ago

11.0.0

1 year ago

11.0.1

1 year ago

8.0.0

3 years ago

7.0.0

3 years ago

6.0.1

5 years ago

6.0.0

5 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

7 years ago

1.0.0

7 years ago