MCPcopy Index your code
hub / github.com/angular/components / ngOnChanges

Method ngOnChanges

src/google-maps/google-map/google-map.ts:273–298  ·  view source on GitHub ↗
(changes: SimpleChanges<this>)

Source from the content-addressed store, hash-verified

271 }
272
273 ngOnChanges(changes: SimpleChanges<this>) {
274 if (changes['height'] || changes['width']) {
275 this._setSize();
276 }
277
278 const googleMap = this.googleMap;
279
280 if (googleMap) {
281 if (changes['options']) {
282 googleMap.setOptions(this._combineOptions());
283 }
284
285 if (changes['center'] && this._center) {
286 googleMap.setCenter(this._center);
287 }
288
289 // Note that the zoom can be zero.
290 if (changes['zoom'] && this._zoom != null) {
291 googleMap.setZoom(this._zoom);
292 }
293
294 if (changes['mapTypeId'] && this.mapTypeId) {
295 googleMap.setMapTypeId(this.mapTypeId);
296 }
297 }
298 }
299
300 ngOnInit() {
301 // It should be a noop during server-side rendering.

Callers

nothing calls this directly

Calls 2

_setSizeMethod · 0.95
_combineOptionsMethod · 0.95

Tested by

no test coverage detected