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

前端之家收集整理的这篇文章主要介绍了angular.js:4411 Uncaught Error: [$injector:modulerr]前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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>

猜你在找的Angularjs相关文章