html - 错误 : Argument 'accomplishmentController' is not a function, 未定义

标签 html css angularjs controller

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

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

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

最佳答案

在 jsfiddle 左上角的“Frameworks & Extensions”框中将 onLoad 切换为“no-wrap- in head”。

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

关于html - 错误 : Argument 'accomplishmentController' is not a function, 未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19350474/

相关文章:

html - 圆形复选框边框不会改变

jquery - 在一行中 Bootstrap HTML 输入字段

javascript - 如何覆盖已经添加的重要元素

javascript - ng-messages 不起作用

javascript - 如何有条件地更改 Angular 中的 orderBy 参数?

jquery - CSS:没有弹出文本

html - 将鼠标悬停在子菜单项上后更改背景图像

css - 在CSS中使用base64的wordpress主题?

html - 如何使元素匹配动态页面的高度

javascript - 通过改变类滑下动画