角谷歌地图,不确定是不是一个函数 [英] angular-google-maps , undefined is not a function

查看:143
本文介绍了角谷歌地图,不确定是不是一个函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题,把角谷歌,地图在我的网站工作。

I'm having some issues to put angular-google-maps working on my website.

有需要的库之后(googleapis / lodash.js /角谷歌-maps.min.js),我无法配置的应用程序。

After include the needed libraries (googleapis/ lodash.js/ angular-google-maps.min.js), I'm unable to configure the app.

我说谷歌地图,以应用模块,像这样的:

I added 'google-maps' to the app module, like this:

var app = angular.module('app', ['iso.directives', 'ngSanitize', 'ui.select', 'facebook', 'google-maps'.ns()]);

和我收到未定义是不是一个函数的错误。

And I received, "undefined is not a function" error.

我按照 HTTPS教程:// angular- ui.github.io/angular-google-maps/#!/use

我已经看到了这个(<一个href=\"https://stackoverflow.com/questions/26425345/ns-undefined-in-google-angular-maps-directive\">.ns()未定义在谷歌地图的角度指令)线程,但于事无补。

I've seen this (.ns() undefined in google angular maps directive) thread, but doesn't help.

谁能帮我?

谢谢!

推荐答案

看起来他们已经摆脱了对NS()函数,但没有更新的文档尚未:

It looks like they've gotten rid of the ns() function, but haven't updated the documentation yet:

https://github.com/angular-ui/angular -Google-地图/拉/ 872 /
https://github.com/angular-ui/angular-google-maps /问题/ 821

更新string'.ns()来'uiGmapstring的所有实例在code和你应该是好的。

Update all instances of 'string'.ns() to 'uiGmapstring' in your code and you should be good.

这篇关于角谷歌地图,不确定是不是一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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