未捕获的错误:[$ injector:modulerr]在离子框架上

时间:2016-03-02 16:03:10

标签: angularjs ionic-framework

我正在使用离子框架构建演示应用程序。在某一点上,我决定使用这个版本的angularjs

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.min.js"></script>

每当我使用上述版本的角度时,我都会收到此错误Uncaught Error:[$ injector:modulerr] 我还在app.js文件中加载了角度模块

angular.module('starter', ['ionic','ngSanitize','emojiApp'])

=============== EDITTED

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>

    <!--<link href="lib/ionic/css/ionic.css" rel="stylesheet">-->
    <link href="css/style.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/ionic.app.css" rel="stylesheet">
    -->

    <!-- ionic/angularjs js -->



    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>


    <!-- emoticon rendering --> 
    <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.min.js"></script>-->
    <!--<script src="lib/ionic/js/ionic.bundle.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" />
    <!-- end of emoticon rendering -->

    <!-- your app's js -->
    <script src="js/app.js"></script>
  </head>
  <body ng-app="starter">

    <ion-pane>
      <ion-header-bar class="bar-stable">
        <h1 class="title">Ionic Blank Starter</h1>
      </ion-header-bar>
      <ion-content>
      <p>Welcome</p>

      <br><br><br><br>
<div ng-controller="emojiController">
<div emoji-form emoji-message="emojiMessage" style="margin-top:100px; margin-left:200px">
    <textarea id="messageInput" ng-model="emojiMessage.messagetext"></textarea>

    <button id="emojibtn">
        <i class="icon icon-emoji"></i>
    </button>
</div></div>

      </ion-content>
    </ion-pane>

  </body>
</html>

=================完成app.js

// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic','ngSanitize','emojiApp'])

emojiApp.controller('emojiController', ['$scope', function($scope) {

    $scope.emojiMessage={};
}])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    if(window.cordova && window.cordova.plugins.Keyboard) {
      // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
      // for form inputs)
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

      // Don't remove this line unless you know what you are doing. It stops the viewport
      // from snapping when text inputs are focused. Ionic handles this internally for
      // a much nicer keyboard experience.
      cordova.plugins.Keyboard.disableScroll(true);
    }
    document.addEventListener('deviceready', function () {
var Pushbots = PushbotsPlugin.initialize("56c898fb17795903658b4567", {"android":{"sender_id":"786368090790"}});
}, false);
    if(window.StatusBar) {
      StatusBar.styleDefault();
    }
  });
})

我在哪里弄错了?

0 个答案:

没有答案