DEV Community

Discussion on: Setup Google Map In Angular App (The Pro Way) Part 1

Collapse
 
13bhavya profile image
Bhavya Shah • Edited

I am having the same error
Uncaught (in promise): ReferenceError: google is not defined.
Tried creating index.d.ts file and even spec.ts.config but not working.

Any solution please.
here my repo - find in mapComponent
github.com/13bhavya/ng-website.git

Collapse
 
devpato profile image
Pato

did you try pamelas aproach?

Collapse
 
13bhavya profile image
Bhavya Shah

I tried to understand that after I found there was an error in script of index.html :
<script src=”http://maps.googleapis.com/maps/api/js?key=API-KEY" type="text"></script>
I added only text not Javascript.
Such a silly I was finding everywhere else.
No need to create index.d.ts file.
Thanks though.

Thread Thread
 
devpato profile image
Pato

Im glad you found you issue :)

Collapse
 
devpato profile image
Pato

Read comments above. They contain the solution :)