Skip to content

minimalist-components/angular-mn-sidenav

Repository files navigation

npm version Dependency Status MIT Licence

angular-mn-sidenav

An angular directive and service to mn-sidenav

See the demo

preview demo

Install

npm install --save angular-mn-sidenav

And bundle dependencies and main files in dist/ with your preferred tool.

Usage

// add dependency in you module
angular.module('app', [
  'mn-sidenav'
]);

And then, in your html, you can use the directive mn-sidenav

<mn-sidenav id="menu">
  <!-- content here -->
</mn-sidenav>

For more details check docs mn-sidenav docs.

Now, about service, you can use the service $mnSidenav, like below:

angular
  .module('app')
  .controller('HomeController', HomeController)

function HomeController($mnSidenav) {
  // to open, call method open with id of sidenav
  $mnSidenav.open('menu')

  // to close sidenav visible, just call .close()
  $mnSidenav.close()
}

About

An angular service to mn-sidenav

Resources

License

Stars

Watchers

Forks

Packages

No packages published