Questions tagged [page.js]

Micro client-side router inspired by the Express router

page.js is a Micro client-side router inspired by the Express router (~1200 bytes)

Installation

There are multiple ways to install page.js. With package managers:

$ npm install page # for browserify
$ component install visionmedia/page.js
$ bower install visionmedia/page.js

Via CDN and script tag:

<script src="https://cdn.rawgit.com/visionmedia/page.js/master/page.js"></script>

Useful Links

42 questions
0
votes
1 answer

AngularJS ui-router ui-sref causing "Uncaught TypeError: Cannot read property '0' of undefined" error

I have an angularJS component using ui-router with 2 simple route states. export default function Routes($stateProvider, $urlRouterProvider, $locationProvider) { $stateProvider .state('details', { url: '/', template:…
mhatch
  • 4,441
  • 6
  • 36
  • 62
0
votes
1 answer

polymer iron-pages pagejs not working

I am implementing a simple routing app in polymer.js using iron-pages and page.js but this is not working.
0
votes
1 answer

Image disappears after routing in app

I'm having an issue that's probably not easy to diagnose so I'm going to describe the general issue I'm having. I'm using a front-end router (page.js) to route around my app. Basically, whenever I route somewhere, I show components that should be…
skwny
  • 2,930
  • 4
  • 25
  • 45
0
votes
1 answer

How to examine url and emit routing with page.js

Is it possible to emit routing on the current URL, i.e., get page.js to call the respective callback on the current path? The use case for this is if a user is signing in/out of my app, I want page.js to then route on the current path, since the…
skwny
  • 2,930
  • 4
  • 25
  • 45
0
votes
0 answers

Refresh using Page.js gives 404 Not Found

I have just started using page.js, a routing library that I intend to use to make a single page application with handlebars. I will use the routes to call different handlebar templates. So far, this functionality is working and is as quick as I had…
Jermaya
  • 156
  • 10
0
votes
1 answer

Polymer and page.js wildcards in routes

Am using the polymer starting kit and am trying to access routes to users that does not necessary have a link to it on the page. routing.html: page('/users/:name', function(data) { app.route = 'user-info'; app.params = data.params; }); On the…
Lasse Sviland
  • 1,479
  • 11
  • 23
0
votes
1 answer

Phonegap with page.js routes works only on desktop

I am using page.js in an HTML+CSS+JS app. The routes work perfectly in browser, even using the "phonegap serve" and accessing my_ip:3000. But when I try to load it in my phoneGap Developer (in an Android phone), only the first route loads (if I try…
Paulo Coghi
  • 13,724
  • 14
  • 68
  • 90
0
votes
1 answer

page.js cancel page leaving

On a single page application, the client is editing a big form at localhost/#!/product/123/edit He navigates away, I want to display a confirm dialog "Are you sure to leave?" [OK] [Cancel]. If he click on [Cancel] he must stay with the form. Here…
Hiep
  • 2,483
  • 1
  • 25
  • 32
0
votes
0 answers

Bookmarking in SPA with page.js using deep links and pretty url

I am getting into SPA programming and have a working app with page.js. I searched stackoverflow and page.js but cannot figure out how to process the URL requests like /record/Name1 when a page is reloaded (or loaded after being shared or…
0
votes
0 answers

client-side routing with page.js between two different spa pages

We are building an application using multiple single-page apps to keep things small, but run into a problem of building links between pages. Let's say we have to pages equipment.html and maintenance.html Both are independent SPA apps each with their…
Shreko
  • 321
  • 4
  • 16
0
votes
1 answer

How to get page.js to work in a single page AND multipage on the same site?

am using page.js for routing in a Grails application using '/' to point /HomeController/index to serve up a single page web application. I just installed Grails Spring Security Core plugin, and I am using the Grails scaffolding to create the User…
TriumphST
  • 1,194
  • 1
  • 10
  • 17
-2
votes
1 answer

What does page() do?

In the first example on https://visionmedia.github.io/page.js/... page('/', index) page('/user/:user', show) page('/user/:user/edit', edit) page('/user/:user/album', album) page('/user/:user/album/sort', sort) page('*', notfound) page() // what does…
Kayce Basques
  • 23,849
  • 11
  • 86
  • 120
1 2
3