Angular-google-maps library not loading

I am using angularjs and node for my application and I want to integrate Google maps in my application. I use this set of directives http://angular-ui.imtqy.com/angular-google-maps/#!/ ,

The problem that appears is this:

Uncaught Error: [$injector:modulerr]    h  ttp://errors.angularjs.org/1.6.2/$injector/modulerr?p0=VisualiseATM&p1=Err…    at%20Mc%20(http%3A%2F%2Flocalhost%3A3000%2Flib%2Fangular.min.js%3A21%3A332)
at angular.min.js:6
at angular.min.js:41
at q (angular.min.js:7)
at g (angular.min.js:40)
at db (angular.min.js:45)
at c (angular.min.js:21)
at Mc (angular.min.js:21)
at qe (angular.min.js:20)
at angular.min.js:331
at HTMLDocument.b (angular.min.js:37)

In particular, this is a problem with:

The 'uiGmapgoogle-maps' module is not available! You either mistakenly wrote the name of the module, or forgot to load it. If registering a module ensures that you specify the dependencies as the second argument.

Here is my angular code:

var app = angular.module("VisualiseATM", [ 'uiGmapgoogle-maps',
'ui.router'
, 'controllers'
, 'ngCookies'
, ]);

app.config(function(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
    key: 'MY_API_KEY',
    v: '3.20', //defaults to latest 3.X anyhow
    libraries: 'weather,geometry,visualization'
});
})

app.config(['uiGmapGoogleMapApiProvider', function(GoogleMapApiProviders) {
    GoogleMapApiProviders.configure({
        china: true
    });
}]
);

I found this on the Internet, but I'm not sure how to use it in my application. https://github.com/angular-ui/angular-google-maps/issues/1489

, angular -simple-logger, , .

, . !

+4
1

Angular -Google-Maps

AngularJS-Google-Maps

<script src="https://maps.google.com/maps/api/js?libraries=placeses,visualization,drawing,geometry,places"></script>
<script src="https://unpkg.com/angular/angular.js"></script>
<script src="https://unpkg.com/ngmap"></script>

DEMO PLNKR


Angular -Google-Maps 2.1.6. Angular -simple-logger:

  <head>
    <script src="//unpkg.com/angular/angular.js"></script>
    <script src="//unpkg.com/angular-google-maps@2.1.6"></script>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
  </head>

  <body ng-app="app">
    <h1>Angular Google Maps</h1>
  </body>

DEMO PLNKR.

Angular -Google-Maps

angular 2 , . - , .

[ ], . , - major, - , / ( /).

:

- GitHub Angular -Google-Maps

+1

Source: https://habr.com/ru/post/1673251/


All Articles