Skip to content

html5Mode appears not to work #116

Closed
@laurelnaiad

Description

@laurelnaiad

(note I've edited this since I first posted it)

I was happy to see from #69 that html5Mode should just work. It doesn't work for me with the sample in Chrome or Firefox. I haven't tested any other browser.

Steps:

  • clone the repository
  • npm install
  • grunt
  • npm install express
  • node server.js (which just launches a server for me at port 3006 over the ui-router directory.

http://localhost:3006/sample

everything works.

change three lines in index.html (starting at line 50)

    [        '$stateProvider', '$routeProvider', '$urlRouterProvider', '$locationProvider',
    function ($stateProvider,   $routeProvider,   $urlRouterProvider, $locationProvider) {
      $locationProvider.html5Mode(true);

After that change, when I go to /sample the content for that page loads and displays properly and then I'm "location.replaced" to "/" and everything ceases to function.

I tried to figure out where things head south but I just don't know the code well enough.

Top level routes and their dynamic segments do work if I copy the build and lib directories into the sample directory and change the paths to them, but deeper routes do not (e.g. /contacts/1 works but /contacts/1/item/a does not).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions