angular-sidebar

    1.1.0 • Public • Published

    angular-sidebar

    NPM

    Live Demo!

    Usage

    // app.js
    angular
      .module('app', [
        require('angular-sidebar')
      ])
    // index.html
    <ng-sidebar class="js-side-nav side-nav" no-drag>
      <nav class="js-side-nav-container side-nav__container">
        <button class="js-menu-hide side-nav__hide">close</button>
        <header class="side-nav__header">
          Side Nav
        </header>
        <ul class="side-nav__content">
          <li>Two</li>
          <li>Three</li>
          <li>Four</li>
        </ul>
      </nav>
    </ng-sidebar>

    API

    angular-sidebar takes in two events, one to open and the other to close

    By adding the no-drag attribute, you can disable the touch handling

    $scope.$broadcast('openSidebar')
    $scope.$broadcast('hideSidebar')

    Install

    npm i angular-sidebar

    DownloadsWeekly Downloads

    3

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • hanford