angular.js文件define(['angular'],function(){angular.module("todosa",[]).controller("todosAngular",function($scope){$scope.sum=newArray();varfn=function(){if($scope.sum.length<10){if($scope.arr!==""&&$scope.arr!==undefined){$scope.sum.unshift($scope.arr);$scope.arr="";}}else{alert("已经10个了,不能在增加了。");$scope.arr="";}}$scope.todosAclick=function(){fn();};$scope.todosAremove=function(){$scope.sum=[];$scope.arr="";};$scope.todosAre=function(s){$scope.sum.splice(s,1);};$scope.akeydown=function(e){if(e.keyCode==13)fn();};});})main.js,reuiqre入口文件require.config({baseUrl:"../js/",paths:{'jquery':'lis/jquery.min','avalon':'lis/avalon.min','angular':'lis/angular.min'}});require(['todosAngular','todosjs','todosAvalon','todosJquery'],function(){});R.js({baseUrl:".",name:'todosmain',paths:{'jquery':'lis/jquery.min','avalon':'lis/avalon.min','angular':'lis/angular.min'},excludeShallow:["angular","avalon","jquery"],out:"todos-Set.js"})报错信息Error:[$injector:unpr]http://errors.angularjs.org/1.4.3/$injector/unpr?p0=eProvider%20%3C-%20e%20%3C-%20todosAngularatError() athttp://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:6:416athttp://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:40:375atObject.d[asget](http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:38:364)athttp://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:40:449atd(http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:38:364)atObject.e[asinvoke](http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:39:124)atP.instance(http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:80:122)atS(http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:61:199)atg(http://127.0.0.1:4000/sunshine/add/js/lis/angular.min.js:54:384)这是我写的todos小demo而已,想尝试用r.js打包,但是angular不停保存。没用r.js打包前基本没有报错。demo地址:为打包打包后
青春有我
波斯汪
相关分类