Google Maps API dynamic load with AngularJS
问题 I'm trying to load Google Maps API using AngularJS: <html data-ng-app="search-app"> <head data-ng-controller="GoogleMaps"> <script ng-src="{{mapsUrl}}" type="text/javascript"></script> .... </head> and controller for that part: search.controller('GoogleMaps', [ '$scope','$sce', function GoogleMaps($scope,$sce) { var mapsUrl = '//maps.google.com/maps/api/js?sensor=false&key=my_api_key'; $scope.mapsUrl = $sce.trustAsResourceUrl(mapsUrl); } ]); but when the Google Map API is called within the