Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmandersen/angular-menu
A Bootstrap menu module for use in Angular
https://github.com/cmandersen/angular-menu
Last synced: 11 days ago
JSON representation
A Bootstrap menu module for use in Angular
- Host: GitHub
- URL: https://github.com/cmandersen/angular-menu
- Owner: cmandersen
- License: mit
- Created: 2014-01-09T10:34:14.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-14T06:30:40.000Z (almost 11 years ago)
- Last Synced: 2023-08-09T15:23:25.725Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular Menu Module
A [Bootstrap](http://getbootstrap.com/) (**3.0.3**) menu module for use in [Angular](http://angularjs.org/) (**1.2.7**).
## Installation
Using the module is simple. Just copy the lib-folder into the root of your Angular installation, and inject "**napp.menu**" in your app.
```javascript
var app = angular.module("exampleApp", ["napp.menu"]);
```The module is also available in a [RequireJS](http://requirejs.org/) compatible version. Just include the `rq-angular-napp-menu.js` file instead of the `angular-napp-menu.js` file.
##Usage
The module consists of three parts, the `` for the menu in general, `` for menu-items with children, and `` for the underlying menu items.
As you can see, the _menu-item-parent_ and _menu-item_ tags, have a _match_ attribute. That attribute is used for regex-matching if the menu-item should be shown as active.
As with normal Angular markup, you can also use attributes, e.g. `
` and `` etc.The module interprits those tags and replaces them with a regular Bootstrap menu.
### Example
```html
Some page
Other page details
Other page list
```