angular-sidebar

WebJar for angular-sidebar

License

License

MIT
Categories

Categories

IDE Development Tools Github Version Controls Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-hanford-angular-sidebar
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-sidebar
WebJar for angular-sidebar
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/hanford/angular-sidebar

Download github-com-hanford-angular-sidebar

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-hanford-angular-sidebar/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-hanford-angular-sidebar</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-hanford-angular-sidebar/
implementation 'org.webjars.npm:github-com-hanford-angular-sidebar:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-hanford-angular-sidebar/
implementation ("org.webjars.npm:github-com-hanford-angular-sidebar:1.1.0")
'org.webjars.npm:github-com-hanford-angular-sidebar:jar:1.1.0'
<dependency org="org.webjars.npm" name="github-com-hanford-angular-sidebar" rev="1.1.0">
  <artifact name="github-com-hanford-angular-sidebar" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-hanford-angular-sidebar', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-hanford-angular-sidebar" % "1.1.0"
[org.webjars.npm/github-com-hanford-angular-sidebar "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.1.0