Skip to content

hanford/angular-sidebar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')

About

super small, mobile ready, vanilla angular sidebar component

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors