Ngmessages Uncaught TypeError l.module (...). Information is not a function
I have installed Angular-Messages in my Ionic V1 app, but I cannot get it to work.
Mistake:
Uncaught TypeError: l.module(...).info is not a function at angular-messages.js:267
at angular-messages.js:6
This is my index.html:
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<script src="js/sha1.js"></script>
<script src="lib/ionic-material/dist/ionic.material.min.js"></script>
<script src="lib/angular-messages/angular-messages.min.js"></script>
and in my app.js
var app = angular.module('starter', ['ionic', 'ngCordovaOauth', 'ionic-material', 'ngMessages'])
Reading bits. I thought it might be a version issue between angular, Angular-animate and Angular-messages that should be compatible with the same version.
List of Bower packages - bower.json:
"dependencies": {
"ng-cordova-oauth": "^0.2.6",
"angular": "~1.6.4",
"angular-animate": "~1.6.4",
"angular-messages": "~1.6.4"
}
But nothing .. still getting the same error. What else could it be? Any ideas?
thank
source to share
@larslemos will help me find a solution to my similar problem.
I've worked with '... / libs / angular.js / 1.6.1 /angular.min.js'
but using '... / libs / angular-messages / 1.6.4 / angular-messages.min.js'.
Changing to angular 1.6.4 or ngMessages 1.6.1 solved the problem.
So just make sure they are the same version, no need to go to 1.5.
source to share
I just had the same problem when coding in angular version 1.6
So I had to change my angular post in bower.json to this:
"dependencies": {
"angular": "~1.5",
"angular-messages": "~1.5"
"angular-animate": "^1.6.2",
"angular-bootstrap": "^2.5.0",
"angular-route": "^1.6.2",
"bootstrap": "^3.3.7",
"lodash": "^4.17.4",
"spin.js": "^2.3.2",
"moment": "^2.17.1",
"toastr": "^2.1.3",
"jquery": "^3.1.1",
"angular-ui-router": "^0.4.2",
"angular-sanitize": "^1.6.3",
},
Hope it helps
source to share