I'm trying to add this: https://github.com/kuhnza/angular-google-places-autocomplete module to my mean app. I used bower to install, which included the following example.
<!DOCTYPE html>
<html ng-app="example">
<head lang="en">
<!-- Required dependencies -->
<script src="https://maps.googleapis.com/maps/api/js?&libraries=places"></script>
<script src="/lib/angular/angular.js"></script>
<!-- Google Places Autocomplete directive -->
<script src="/lib/angular-google-places-autocomplete/src/autocomplete.js"></script>
<script>
angular.module('example', ['google.places'])
// Setup a basic controller with a scope variable 'place'
.controller('MainCtrl', function ($scope) {
$scope.place = null;
});
</script>
</head>
<body ng-controller="MainCtrl">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Basic Usage</h1>
<form class="form">
<input class="form-control" g-places-autocomplete ng-model="place"/>
</form>
<h5>Result:</h5>
<pre>{{place | json}}</pre>
</div>
</div>
</div>
</body>
</html>
When I run my app on localhost and type the url corresponding to the location of the example, everything works fine. But instead, if I copy and paste this code into view.html and follow a link to this file, the code is nonfunctional. Now, if I add 'google.places' to the var applicationModuleVendorDependencies
array in config.js, I get the following error.
Uncaught Error: [$injector:modulerr] Failed to instantiate module borowr due to:
Error: [$injector:modulerr] Failed to instantiate module google.places due to:
Error: [$injector:nomod] Module 'google.places' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
What is the proper way to add 3rd party modules to a mean app?