简体   繁体   English

我不断收到错误:$ injector:modulerr AngularJS模块错误。

[英]I keep getting Error: $injector:modulerr Module Error with AngularJS.

I am trying to teach myself Angular and I keep getting an error. 我正在尝试自学Angular,并且不断出错。 I wrote a simple bit of code to test out Angular while following a tutorial and I keep getting this error and Angular not doing what it's supposed to do. 我按照教程编写了一些简单的代码来测试Angular,但我不断收到此错误,而Angular并未执行应做的事情。

 angular.min.js:6Uncaught Error: [$injector:modulerr] 
    http://errors.angularjs.org/1.5.7/$injector/modulerr?
0%20%20at%20c%20(http%3A%2F%2F127.0.0.1%3A8080%2Fangular.min.js%3A20%3A359)(anonymous function) @ angular.min.js:6(anonymous function) @ angular.min.js:40r @ angular.min.js:7g @ angular.min.js:39db @ angular.min.js:43c @ angular.min.js:20Bc @ angular.min.js:21ge @ angular.min.js:19(anonymous function) @ angular.min.js:315b @ angular.min.js:189Sf @ angular.min.js:37d @ angular.min.js:36

This is my code 这是我的代码

<!DOCTYPE html>
<html ng-app='store'>
    <head>
        <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
    </head>
    <body>
        <script type="text/javascript" src="angular.min.js"></script>
        <script type="text/javasciprt" src="app.js"></script>
        <p>{{"hello" + " you"}}</p>
    </body>
</html>

And the JS 和JS

var app = angular.module('store', []);

You have a typo in you script tag where including app.js - 您的脚本标记中有错字,其中包括app.js

text/javasciprt 文字/ javasciprt

instead of text/javascript 代替text/javascript

By the way, there is no need to write text/javascript at all, according to html5 standard. 顺便说一句,根据html5标准,根本不需要编写text/javascript

ng-app ='store'输入正文标签。

<body ng-app='store'> </body>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM