Ngmessages Uncaught TypeError l.module(...)。info不是函数 [英] Ngmessages Uncaught TypeError l.module(...).info is not a function

查看:201
本文介绍了Ngmessages Uncaught TypeError l.module(...)。info不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将Angular-Messages安装到我的Ionic V1应用程序中,但我无法使其正常工作。

I've installed Angular-Messages to my Ionic V1 App but I cannot make it work.

错误:

Uncaught TypeError: l.module(...).info is not a function at angular-messages.js:267
at angular-messages.js:6

这是我的index.html:

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>

和我的app.js

var app = angular.module('starter', ['ionic', 'ngCordovaOauth', 'ionic-material', 'ngMessages'])

读一下我认为这可能是角度,角度动画和角度消息之间的版本问题,它们必须是同一版本兼容。

Reading a bit I thought that could be a version problem between angular, angular-animate and angular-messages, which they have to be at the same version to be compatible.

Bower包列表 - bower.json:

Bower packages list - 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?

谢谢

推荐答案

@larslemos'回答帮助我找到解决我类似问题的方法。

@larslemos' answer help me find the solution to my similar problem.

我正在使用'... / libs / angular.js / 1.6.1 / angular .min.js'

但是使用'... / libs / angular-messages / 1.6.4 /angular-messages.min.js'。

I was working with '.../libs/angular.js/1.6.1/angular.min.js'
but using '.../libs/angular-messages/1.6.4/angular-messages.min.js'.

更改为角度 1.6.4 或ngMessages 1.6.1 确实解决了问题。

Changing to angular 1.6.4 or ngMessages 1.6.1 did solved the issue.

所以基本上只要确保它们是相同的版本,不需要转到1.5。

So basically just make sure they are the same version, no need to go to 1.5.

这篇关于Ngmessages Uncaught TypeError l.module(...)。info不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆