https://github.com/gwendall/meteor-iron-router-cordova-only
Redirects visitors that are not accessing your app through Cordova
https://github.com/gwendall/meteor-iron-router-cordova-only
Last synced: 2 months ago
JSON representation
Redirects visitors that are not accessing your app through Cordova
- Host: GitHub
- URL: https://github.com/gwendall/meteor-iron-router-cordova-only
- Owner: gwendall
- Created: 2015-08-06T15:33:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-10T13:30:33.000Z (almost 10 years ago)
- Last Synced: 2025-03-18T05:56:56.168Z (2 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Installation
------------``` sh
meteor add gwendall:iron-router-cordova-only
```What is does
============This package redirects visitors that are not accessing your app through Cordova.
It is particularly handy if you don't want to let people access your app via a web browser by visiting its mobile-server url.Configuration
=======``` javascript
Router.cordova.only({
redirectTo: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', // URL the visitor will be redirected to
redirectingTpl: 'redirecting', // Provide a template name if you want to temporarily render it before redirecting
redirectingDelay: 1000, // Delay before redirecting
only: [], // Only apply redirect to certain routes - pass an array of route names
except: [], // Apply redirect to all routes except some - pass an array of route names
development: true // Pass true if you want the redirect to happen in development mode (false by default)
});
```