4

I am trying to inject an emoji app into my project. I have added the emoji.min.js and referenced it like this

<script type="text/javascript" src="js/emoji.min.js"></script>

Now I am also injecting it into my project like this:

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

Immediately I inject the emojiApp, I get the following error.

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.14/$injector/modulerr?p0=ionicApp&p1=Error%…gleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.14%2Fangular.min.js%3A29%3A115)

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

Completed injected file

angular.module('ionicApp', ['ionic','LocalStorageModule','ngImgCrop', 'btford.socket-io', 'angularMoment','ngCordova','ngResource','ngSanitize','emojiApp'])

Complete script used in the index file

<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" />

Please what am I getting wrong. Kindly Assist!

8
  • may be u inject it before angular js files Commented Mar 3, 2016 at 10:23
  • emoji module is injected last Commented Mar 3, 2016 at 10:24
  • emoji has dependency on jQuery - have you included that? Commented Mar 3, 2016 at 10:31
  • I have included jQuery. Please check my edits Commented Mar 3, 2016 at 10:35
  • u must inject it befor app.js Commented Mar 3, 2016 at 10:36

1 Answer 1

0

please try to add <!-- emoticon scripting --> section before <!--fan page search resource-->

it may be version issue,
you added angularjs/1.2.14/angular.min.js and angular.js/1.3.7/angular-sanitize.min.js

try to use same version

Sign up to request clarification or add additional context in comments.

9 Comments

This is not a jsfiddle issue
Still thesame issues
Oh! is this happening because of emoji?
Uncaught ReferenceError: jQuery is not defined
Uncaught Error: [$injector:modulerr] Failed to instantiate module ionicApp due to: Error: [$injector:modulerr] Failed to instantiate module emojiApp due to: TypeError: Cannot set property 'spritesheetPath' of undefined at localhost:8100/js/emoji.min.js:3:593
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.