链接到页面上的ID的href在推送到heroku后不起作用

时间:2016-02-24 19:01:39

标签: javascript html angularjs heroku href

我正在开发一个AngularJs应用程序,并且我已经在'关于我们'上添加了一个下拉菜单。链接到该页面上的部分的快捷方式,它在本地完美地工作,但在推送到heroku之后它不起作用。出于某种原因,无论您点击哪个链接,都会将您带到页面的公司部分。我不确定我是否打算在路线上添加一些东西?

如果您还有其他需要,请告诉我。

链接到heroku:https://cryptic-taiga-13132.herokuapp.com/#/aboutUs

navbar.html

<nav class="navbar navbar-default navbar navbar-fixed-top" role="navigation">
<div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-title" href="#">atlantic</a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse nav navbar-nav" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">

            <li class="dropdown">
              <a href="#aboutUs" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">about us<span class="caret"></span></a>
              <ul class="dropdown-menu">
                    <li><a href="#aboutUs">about us</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="#aboutUs#teamMembers">team</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="#aboutUs#clientsContainer">clients</a></li>
              </ul>
            </li>

            <li><a href="#ourWork">our work</a></li>
            <li><a href="#contactUs">contact us</a></li>
        </ul>
    </div><!-- /.navbar-collapse -->
    <social-media-icons></social-media-icons>
</div><!-- /.container-fluid -->

app.js

var atlantic = angular.module('Atlantic', ['ngResource', 'ngRoute']);


atlantic.config(['$routeProvider',
  function($routeProvider) {
    $routeProvider
      .when('/', {
        redirectTo: '/aboutUs'
      })
        .when('/aboutUs', {
        templateUrl: 'app/partials/aboutUs/aboutUs.html',
                controller: 'AboutUsController',
        controllerAs: 'aboutCtrl'
      })
      .when('/ourWork', {
        templateUrl: 'app/partials/ourWork/ourWork.html'
      })
      .when('/contactUs', {
        templateUrl: 'app/partials/contactUs/contactUs.html'
      })
      .otherwise({
    redirectTo: '/aboutUs'
  });
}]);

aboutUs.html

<section>

  <intro></intro>

  <companies>   </companies>

  <team>
    <section id='teamMembers' class="row">
        ...
    </section>
  </team>

  <clients>
    <section id='clientsContainer'>
        ...
    </section>
  </clients>

</section>

0 个答案:

没有答案