
angularJS
sunnygirl090403
这个作者很懒,什么都没留下…
展开
-
Notepad 关于angularJS的自动填充不靠谱
如下代码 test angular.module('myApp',[]).controller('personController', function personController($scope) { console.log("rose");} ) 在控制台实在打印不出rose.纠结对比半天,原创 2015-07-16 11:29:50 · 1479 阅读 · 0 评论 -
html中调用angularjs函数需要加上()
如下代码片段没有显示 fullName的值。控制台也未报错: html代码片段: 姓名: {{fullName}} 控制器代码片段: $scope.fullName = function() { var x; console.log("here") x = $scope.person1; return x.first原创 2015-07-16 15:28:54 · 11190 阅读 · 1 评论 -
Uncaught ReferenceError: angular is not defined 错误
如下代码报错: Uncaught ReferenceError: angular is not defined test var myAppModule = angular.module('myApp',[]); myAppModule.controller('personController', function p原创 2015-07-16 14:26:18 · 19136 阅读 · 3 评论 -
应该是一个控制器必须定义在一个模块中,并且模块的名字不得为空。
w3c school上有如下代码。报错:[ng:areq] http://errors.angularjs.org/1.3.15/ng/areq?p0=personController&p1=not%20a%20function%2C%20。 名: 姓: 姓名: {{person.firstName + " " + person.lastName}}原创 2015-07-16 14:53:55 · 639 阅读 · 0 评论 -
angular学习注意事项
1. 引用的script语句应该放在html中,而不是放在js代码中 2. 过滤器uppercase不要写成upercase 3. ng-repeat中的orderby用法一定要加单引号。不然结果不对。原创 2015-07-16 16:26:25 · 463 阅读 · 0 评论 -
AngularJS 用 $http.jsonp 方法跨域请求数据错误的问题
angular.module('myApp',[]).controller('test11', function test11($scope,$http) { $http.jsonp("https://api.github.com/repos/cs1707/blog/posts?callback=JSON_CALLBACK") .success(原创 2015-07-20 18:32:19 · 9406 阅读 · 2 评论