我正在尝试将emoji应用程序注入我的项目中。 我添加了emoji.min.js并像这样引用它
<script type="text/javascript" src="js/emoji.min.js"></script>
现在我也将它注入我的项目中:
angular.module('ionicApp', ['ionic','ngSanitize','emojiApp'])
我立即注入emojiApp
,
我收到以下错误。
未捕获错误:[$ injector:modulerr] http://errors.angularjs.org/1.2.14/ $注射器/ modulerr P0 = ionicApp&安培; P1 =错误%... gleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.14%2Fangular.min.js%3A29%3A115)
=================== EDITTED =============
完成注入文件
angular.module('ionicApp', ['ionic','LocalStorageModule','ngImgCrop', 'btford.socket-io', 'angularMoment','ngCordova','ngResource','ngSanitize','emojiApp'])
索引文件中使用的完整脚本
<script type="text/javascript" src="http://maps.google.com/maps/api/js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<!-- css scripting for fan page search-->
<!--<link href="http://code.ionicframework.com/1.0.0-beta.9/css/ionic.css" rel="stylesheet">-->
<!--cdn for isportline css fonts-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- for the ionic lightbox-->
<link rel="stylesheet" href="css/lightbox.css">
<!--increase the height and the width of the ionic lightbox-->
<!-- Ionic framework - replace the CDN links with local files and build -->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!--<link rel="stylesheet" href="css/autocomplete.css">-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- <script src="http://code.ionicframework.com/0.9.27/js/ionic.bundle.min.js"></script>-->
<!--fan page search resource-->
<!-- <script src="http://code.angularjs.org/1.2.12/angular-resource.js"></script>-->
<script src="lib/ionic/js/angular/angular-resource.min.js"></script>
<!-- <script type="text/javascript" src="js/autocomplete.js"></script>-->
<script src="lib/angular-local-storage/dist/angular-local-storage.min.js"></script>
<script src="dist/ng-cordova.min.js"></script>
<script src="js/ng-crop.js"></script>
<script src="js/loader-image.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
<script src="lib/moment/min/moment.min.js"></script>
<script src="lib/angular-moment/angular-moment.min.js"></script>
<script src="lib/sio-client/socket.io.js"></script>
<script src="http://192.168.19.12:3000/socket.io/socket.io.js"></script>
<script src="lib/angular-socket-io/socket.js"></script>
<script src="js/services/SocketService.js"></script>
<script src="js/controllers/HomeController.js"></script>
<script src="js/controllers/RoomController.js"></script>
<!-- emoticon scripting -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular-sanitize.min.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/emoji.min.js"></script>
<link type="text/stylesheet" rel="stylesheet" href="css/emoji.min.css" />
请问我出错了什么。请帮助!
答案 0 :(得分:0)
请尝试添加<!-- emoticon scripting -->
<!--fan page search resource-->
之前的部分
可能是版本问题,
你补充说
angularjs/1.2.14/angular.min.js
和angular.js/1.3.7/angular-sanitize.min.js
尝试使用相同的版本