Socket
Socket
Sign inDemoInstall

angular-slideout

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-slideout

Lightweight angular slideout directive for mobile which does not require angular-animate.js


Version published
Weekly downloads
6
increased by50%
Maintainers
1
Install size
2.03 MB
Created
Weekly downloads
 

Readme

Source

Angularjs Slideout

Lightweight angular slideout directive for mobile which does not require angular-animate.js

Demo

Dependencies

  • angular
  • Optional dependency of angular touch for swiping menu away

Install

If you are using npm or webpack

npm install --save angular-slideout

Import angular-slideout after angular and require it as a module to your app.

var angular_slideout = require('angular-slideout');
var app = angular.module('app', ['angular-slideout', 'ngTouch']);
app.controller('main', function($scope) {});

Otherwise import slideout.min.js as so.

<!-- Angular -->
<script src="http://code.angularjs.org/1.2.19/angular.min.js"></script>
<!-- Angular touch (not required) -->
<script src="http://code.angularjs.org/1.2.19/angular-touch.min.js"></script>
<!-- Slideout module -->
<script src="slideout.min.js"></script>
<!-- Your App Code -->
<script>
    // import angular-slideout
    var app = angular.module('app', ['angular-slideout', 'ngTouch']);
    app.controller('main', function($scope) {});
</script>

Usage

Configure your sidebar content
<nav slideout="show_menu" slideout-direction="from-left">
  <div class="back-button" ng-click="show_menu = false;">Back</div>
  <h2>Menu content</h2>
</nav>
  • The slideout attribute: Use a boolean variable to determine whether to show slideout.
  • The slideout direction: Options are 'from-left' or 'from-right'

####Configure sidebar toggles

<div class="show-sidebar" ng-click="show_menu = true;">
  Show sidebar
</div>

####Configure swipe toggles (requires angular-touch)

<div class="container"
	 ng-swipe-left="show_menu = true"
	 ng-swipe-right="show_menu = false; show_sub_menu = false;">
	 ...
</div>

Keywords

FAQs

Last updated on 08 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc