[ 登录注册 ]

yuyan

angular.js:4411 Uncaught Error: [$injector:modulerr]

2016-08-25 22:33:35 admin 返回上一页

1、错误描述

angular.js:4411 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.6/$injector/modulerr?p0=app&p1=Error%3A%20%…F%2Fapps.bdimg.com%2Flibs%2Fangular.js%2F1.4.6%2Fangular.min.js%3A19%3A463)

2、错误原因

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>AngularJS之过滤器</title>
		<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
	</head>
	<body>
		<div ng-app="app" ng-controller="filterCon">
			<input type="text" ng-model="username" /><br><br>
			姓名:{{username | uppercase}}<br><br>
		</div>
	</body>
</html>


3、解决办法

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>AngularJS之过滤器</title>
		<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
		<script>
			var app = angular.module("app",[]);
			app.controller("filterCon",function($scope){
				$scope.username = "Hello,World!";
			});
		</script>
	</head>
	<body>
		<div ng-app="app" ng-controller="filterCon">
			<input type="text" ng-model="username" /><br><br>
			大写:{{username | uppercase}}<br><br>
			小写:{{username | lowercase}}<br>
		</div>
	</body>
</html>



文章来源:http://www.bozhiyue.com/web/yuyan/2016/0825/433307.html
返回上一页    返回分类 上一篇:   下一篇:
相关