Skip to content

Commit

Permalink
fix(modal): fix circular dependency warning (#3359)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSurmay authored and valorkin committed Jan 5, 2018
1 parent dd33e63 commit 59c0bf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modal/bs-modal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class BsModalService {
.provide({ provide: BsModalRef, useValue: bsModalRef })
.attach(ModalContainerComponent)
.to('body')
.show({ content, isAnimated: this.config.animated });
.show({ content, isAnimated: this.config.animated, bsModalService: this });
modalContainerRef.instance.level = this.getModalsCount();
bsModalRef.hide = () => {
modalContainerRef.instance.hide();
Expand Down
2 changes: 1 addition & 1 deletion src/modal/modal-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export class ModalContainerComponent implements OnInit, OnDestroy {
isShown = false;
level: number;
isAnimated: boolean;
bsModalService: BsModalService;
private isModalHiding = false;

constructor(options: ModalOptions,
protected _element: ElementRef,
private bsModalService: BsModalService,
private _renderer: Renderer2) {
this.config = Object.assign({}, options);
}
Expand Down

0 comments on commit 59c0bf9

Please sign in to comment.