Skip to content

danjarvis/dark-overlay-sliding-menu-animator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

dark-overlay-sliding-menu-animator

A sliding menu animator for OnsenUI which provides a darker overlay.

Installation

Install with bower or npm

bower install dark-overlay-sliding-menu-animator

npm install dark-overlay-sliding-menu-animator

Usage

Use the ons-sliding-menu component and set the type attribute to something like 'dark-overlay':

<ons-sliding-menu
  menu-page="menu.html" main-page="main.html"
  type="dark-overlay" max-slide-distance="260px" swipeable="true" />

Register the animator in the controller responsible for interacting with the ons-sliding-menu:

(function(){
  'use strict';

  var module = angular.module('AppController', []);

  module.controller('AppController', [
    '$scope',
    'SlidingMenuView',
    'DarkOverlaySlidingMenuAnimator',
    function($scope, SlidingMenuView, DarkOverlaySlidingMenuAnimator) {

    SlidingMenuView.registerSlidingMenuAnimator('dark-overlay',
        new DarkOverlaySlidingMenuAnimator());
  }]);
})();

The type attribute in your markup must match the name argument passed to SlidingMenuView.registerSlidingMenuAnimator().

License: Apache 2.0

About

Sliding menu animator for OnsenUI with a dark overlay.

Resources

Stars

Watchers

Forks

Packages

No packages published