2

I used index.html for master of my page and I have partial views with ng-view and $routeProvider. after I remove # character from the URL (with html5mode) my app doesn't work with URL ( except for default route ) . also open page as new tab returns 404 error. the app can not find index.html. everything works when I click a link in a browser

<!DOCTYPE html >
<html ng-app="myApp">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<!-- CSS File -->
<!-- JS File -->
<title></title>
</head>
<body>
  <div class="container" ng-controller="RootController">
  <!-- Header Of Page -->
  <div class="header">
    <a href="" class="header_logo">
      <img src="img/logo.png">
    </a>
    <a href="" class="header_name">
    </a>
    <a href="{{ link }}" class="header_signOut">
    </a>
  </div>
  <!-- Separator Line -->
  <div class="separator"></div>
  <!-- Rendered By AngularJS -->
  <div class="myClass" ng-view></div>
  <!-- Footer -->
  <div class="footer"></div>
  </div>
</body>
</html>

This is the routing

when('/', {
  controller: OperatorController,
  templateUrl: 'html/operator.html'
}).

when('/simReport', {
  controller: SimReportController,
  templateUrl: 'html/simReport.html'
}).
4

1 に答える 1