1

my current iFrame page is loaded with a index.html#/myPage it works nicely under Chrome or Safari, but not with IE 11

I found this solution on SO : add a / before the # (index.html/#/myPage) and it will solve your problem

it looks so simple, but in my case it produces a 404 Page not found

it seems that my route provider doesn't support the / before the #, why ?

Routing code :

appSkeleton.config(
    function ($routeProvider) {
    $routeProvider.
            when('/', {
                template: '<skeleton-manage></skeleton-manage>'
            })
            .when('/skeletonManage', {
                template: '<skeleton-display-and-manage></skeleton-display-and-manage>'
            })
           .when('/employeeManage/:employeeId/:displayMode/:idItemClick?', {
                template: '<employee-display-and-manage></employee-display-and-manage>'
            })          
            .otherwise({
                redirectTo:'/'
            });

    }
);

The application works on a Node.JS server

Community
  • 1
  • 1
PEC
  • 632
  • 1
  • 11
  • 28
  • 1
    Because whatever web server you are using is treating `/index.html/` as _not_ the same resource as `/index.html`. That's _normal_. You can change this behavior at the web server level using some sort of aliases or URL rewriting. Depends on what's serving that resource. – Sergiu Paraschiv Feb 09 '15 at 10:29
  • can you show us your routing code? and which version of IE? – Ravimallya Feb 09 '15 at 10:34

1 Answers1

3

It didn't work with app/index.html#/ but It worked well with app/#/, you don't need specify the index.html on URL or you can redirect directly to URL without index.html by code

var url =  window.location.href;
      if(url.indexOf("index.html") > 0){
          window.location.replace(url.replace("index.html",""));
}