【问题标题】:Error: Argument 'accomplishmentController' is not a function, got undefined错误:参数 'accomplishmentController' 不是函数,未定义
【发布时间】:2013-10-14 05:41:42
【问题描述】:

http://jsfiddle.net/natecraft/jtMAq/3/

我不知道为什么会出现此错误。感谢您的帮助。

function accomplishmentController($scope) { 
  $scope.accomplishments = [{ name: "nate", count: 1 }];
} 

【问题讨论】:

    标签: html css angularjs controller


    【解决方案1】:

    在jsfiddle左上角的“Frameworks & Extensions”框中切换到“no-wrap-in head”而不是onLoad。

    仅供参考...原因是使用 onload 将 angular 放入 $(document).ready(function() {}); 的闭包内。将其封闭会导致各种问题。

    【讨论】:

      猜你喜欢
      • 2013-06-21
      • 2015-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-24
      • 2014-09-18
      • 2015-11-03
      • 2016-10-23
      相关资源
      最近更新 更多