Help me pls javascript google map not work some time

Ok, so you need to ensure that ‘Google Maps JavaScript API’ is loaded.

E.g., by moving the script from the body into the head. And, by removing ‘async’.

In your .ts do you:

...

import {} from '@types/googlemaps';

if (google) {

  ...

  this.map = new google.maps.Map(this.mapElement.nativeElement, opts);
}