Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jhsu/growing-panes

child view display limiting for AngularJs and ui-router
https://github.com/jhsu/growing-panes

Last synced: 21 days ago
JSON representation

child view display limiting for AngularJs and ui-router

Awesome Lists containing this project

README

        

# growing-panes

An AngularJS directive for limiting the number of views shown.

## Usage

To show only the two deepest states at a time:

```javascript
$stateProvider
.state('home', {
url: '/home',
templateUrl: '/templates/home.html',
data: {depth: 1},
})
.state('home.details', {
url: '/details',
templateUrl: '/templates/home.details.html',
data: {depth: 2},
})
.state('home.details.form', {
url: '/form',
templateUrl: '/templates/home.details.form.html',
data: {depth: 3},
})
;
```

```html




```

The limited number of views to show can be adjusted by setting `paneLimit` in
the data to a different value (the default is `2`).

## Dependencies

- angular.js
- ui-router