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

Method ngOnInit

src/google-maps/map-rectangle/map-rectangle.ts:149–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147 new EventEmitter<google.maps.Rectangle>();
148
149 ngOnInit() {
150 if (this._map._isBrowser) {
151 this._combineOptions()
152 .pipe(take(1))
153 .subscribe(options => {
154 if (google.maps.Rectangle && this._map.googleMap) {
155 this._initialize(this._map.googleMap, google.maps.Rectangle, options);
156 } else {
157 this._ngZone.runOutsideAngular(() => {
158 Promise.all([this._map._resolveMap(), google.maps.importLibrary('maps')]).then(
159 ([map, lib]) => {
160 this._initialize(map, (lib as google.maps.MapsLibrary).Rectangle, options);
161 },
162 );
163 });
164 }
165 });
166 }
167 }
168
169 private _initialize(
170 map: google.maps.Map,

Callers

nothing calls this directly

Calls 3

_combineOptionsMethod · 0.95
_initializeMethod · 0.95
_resolveMapMethod · 0.80

Tested by

no test coverage detected