Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fourlabsldn/fl-modal-router
Change page url according to modals opening and closing.
https://github.com/fourlabsldn/fl-modal-router
Last synced: 5 days ago
JSON representation
Change page url according to modals opening and closing.
- Host: GitHub
- URL: https://github.com/fourlabsldn/fl-modal-router
- Owner: fourlabsldn
- Created: 2016-03-23T16:55:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-14T09:39:56.000Z (about 8 years ago)
- Last Synced: 2024-10-11T13:18:07.881Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 743 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fl-modal-router
[![Build Status](https://travis-ci.org/fourlabsldn/fl-modal-router.svg?branch=master)](https://travis-ci.org/fourlabsldn/fl-modal-router)## The goals of the modal router are:
- back button to dismiss modal
- forward button to reopen modal
- back to modal with back button if closed modal pressing 'x'
- no modal load from URL## Decision point:
If I am on a page and I
- 1 ) open a modal
- 2 ) close a modal
- 3 ) refresh the pageWhat should the back buton do?
- Go to the modal URL refreshing the page, as we cannot assume that the modal content is setup, or even that it exists after the refresh.
- Assume the modal content is there and try to open it
- Try to open it, if it doesn't work, then refresh it.The approach we are taking here is to assume the least possible, so we perform a full refresh.
# Development
```
npm run dev
```# Demo
```
npm run demo
```