Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View child fix for Angular 9 #131

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/components/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class MapComponent implements OnChanges, OnInit, OnDestroy {
private _options: IMapOptions = {};
private _box: IBox = null;
private _mapPromise: Promise<void>;
@HostBinding('class.map-container') public _containerClass: boolean = true;
@HostBinding('class.map-container') public _containerClass = true;
@ViewChild('container') private _container: ElementRef;
@ContentChildren(MapMarkerDirective) private _markers: Array<MapMarkerDirective>;

Expand Down Expand Up @@ -276,11 +276,19 @@ export class MapComponent implements OnChanges, OnInit, OnDestroy {
* @memberof MapComponent
*/
public ngOnInit(): void {
this.InitMapInstance(this._container.nativeElement);
this.MapPromise.emit(this._mapService.MapPromise);
this.MapService.emit(this._mapService);
}

/**
* Called after Angular has fully initialized a component's view. Part of ng Component life cycle.
*
* @memberof MapComponent
*/
public ngAfterViewInit(): void {
this.InitMapInstance(this._container.nativeElement);
}

/**
* Called when changes to the databoud properties occur. Part of the ng Component life cycle.
*
Expand Down