Javascript找不到我导入的构造函数

时间:2018-02-14 18:02:50

标签: javascript html

我正在尝试在网络应用中实现模型视图控制。我正在导入html底部的所有js,但是我收到了这个错误:

$pd

我在下面发布了我的相关代码。如何找不到$pd[0] = "<b>$pd[0]</b>"; ?它的导入方式与Uncaught ReferenceError: SideController is not defined at HTMLDocument.<anonymous> (app.js:9) 完全相同,似乎导入成功。

SideController

JS / app.js:

SideBarView

JS /控制器/ sidebarController.js:

<!DOCTYPE html>
<html lang="en">
  <body>
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 sidebar collapse" id="sidebar">
      <div class="noofpeople">
        <div class="row noofpeople-wrapper">
          <h4>My Dinner</h4>
          <label>People <input id="numberOfGuests" type="number" class="form-control"></label><button type="button" id="plusButton"><span class="glyphicon glyphicon-plus"></span></button><button type="button" id="minusButton"><span class="glyphicon glyphicon-minus"></span></button>
        </div>
      </div>
  </div>

  <!-- jQuery -->
      <script src="https://code.jquery.com/jquery.js"></script>

  <!-- The application JavaScript code -->  
      <script src="js/app.js"></script>
      <script src="js/model/dinnerModel.js"></script>
      <script src="js/view/sidebarView.js"></script>
      <script src="js/controllers/sidebarController.js"</script>
  </body>
</html>

1 个答案:

答案 0 :(得分:0)

我在最后一次导入时错过了>