# riot-nav

> Manages the navigation of hierarchical content for riot.js like UINavigationController in iOS.

Latest version **0.2.3** (published 2017-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install riot-nav
pnpm add riot-nav
yarn add riot-nav
bun add riot-nav
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2017-08-16 |
| First published | 2017-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | iq3+Li |
| Maintainers | iq3addli |
| Keywords | riot, riotjs, single-page-applications, minimal, manages-the-navigation |

## Links

- npm: https://www.npmjs.com/package/riot-nav
- Repository: https://github.com/iq3addLi/riot-nav
- Homepage: https://github.com/iq3addLi/riot-nav#readme
- Issues: https://github.com/iq3addLi/riot-nav/issues
- npm.io page: https://npm.io/package/riot-nav

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.2.3 (latest) — 2017-08-16
- 0.2.2 — 2017-08-13
- 0.2.1 — 2017-07-05
- 0.2.0 — 2017-07-03

## README

# riot-nav
View stack manager for riot.js like UINavigationController in iOS.

<a href="https://www.npmjs.com/package/riot-nav"><img src="https://img.shields.io/npm/v/riot-nav.svg?style=shield"></a>

SPA development using riot.js is almost the same as iOS development.
When I looked like this, I wanted to do view management like iOS, so I tried making it.😎

## How to use

### import tag
```html
<script type="riot/tag" src="path/to/NavigationController.tag"></script>
```
### mount with root tag
Please note that you need to write with lowercase.
```html
<navigationcontroller root="rootviewcontroller" />
```

## Access
From the tag of the child you can refer from opts.nav
```js
opts.nav
opts.navigationController // Familiar to iOS engineers
```
## API

### push
```js
nav.push( tagName, opts )
```

### pop
```js
nav.pop()
```

## Lifecycle
By having the function property below, you can handle events of navigationControler.
```js
didLoad 
willAppear 
didAppear 
willDisappear 
didDisappear
```

## Demo
[View demo](https://iq3addli.github.io/riot-nav/index.html)

## Check list
|Browser|Version|OS|Result|
|:---|:---|:---|:---:|
|Safari|10.1.1|MacOSX Sierra|◯|
|FireFox|52.0.2|MacOSX Sierra|◯|
|Chrome|58.0.3029.110|MacOSX Sierra|◯|
|Internet Exploror|11.0.15063.0|Windows 10|◯|
|MS Edge|40.15063.0|Windows 10|◯|
|Internet Exploror|11.0.9600.18639|Windows 8.1|×|

## Future plans
* Add transition choice
* Providing a means for setting custom transitions

Thank you for using! 😄

---
_Source: https://npm.io/package/riot-nav · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
