angular-mn-sidenav
v0.0.6
Published
an angular directive and service to mn-sidenav
Downloads
4
Maintainers
Readme
angular-mn-sidenav
An angular directive and service to mn-sidenav
See the 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()
}