Skip to content

Commit 62bdc8a

Browse files
authored
Update README.md
1 parent f52bf41 commit 62bdc8a

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -166,30 +166,30 @@ modal-dialog.component.css
166166
modal-dialog.component.html
167167

168168
<!-- Modal -->
169-
<div class="modal fade in" role="dialog" tabindex="-1" aria-hidden="true" #thisModal>
170-
<div class="modal-dialog">
171-
172-
<!-- Modal content-->
173-
<div class="modal-content">
174-
<div class="modal-header">
175-
<button type="button" class="close" (click)="closeModal()"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
176-
<h4 class="modal-title">{{ title }}</h4>
177-
</div>
178-
<div class="modal-body">
179-
<div #datacontainer></div>
180-
</div>
181-
<div class="modal-footer">
182-
<button type="button" class="btn btn-default" (click)="closeModal()">Close</button>
169+
<!-- Modal -->
170+
<div class="modal-box" #modalBox>
171+
<div class="modal" role="dialog" tabindex="-1" aria-hidden="true">
172+
<div class="modal-dialog" tabindex="0" role="dialog" [attr.aria-label]="title">
173+
<!-- Modal content-->
174+
<div class="modal-header">
175+
<button type="button" aria-label="Close" tabindex="0" class="close" (click)="closeModal()">
176+
<span aria-hidden="true">&times;</span>
177+
<span class="sr-only">Close</span>
178+
</button>
179+
<h4 class="modal-title">{{ title }}</h4>
180+
</div>
181+
<div class="modal-body" tabindex="-1">
182+
<div #datacontainer></div>
183+
</div>
183184
</div>
184185
</div>
185186

186-
</div>
187187

188188
modal-dialog.component.ts
189189

190190
import {
191-
Component, Input, OnInit,
192-
ComponentFactoryResolver, ViewContainerRef, ViewChild, ElementRef, Renderer2, AfterContentInit
191+
Component, Input, OnInit, ComponentFactoryResolver, ViewContainerRef, ViewChild,
192+
ElementRef, Renderer2, AfterContentInit, EventEmitter, Output, HostListener, OnChanges, AfterViewInit
193193
} from '@angular/core';
194194
import { ComponentLoaderService } from '../component-loader.service';
195195

@@ -200,11 +200,13 @@ modal-dialog.component.ts
200200
styleUrls: ['./modal-dialog.component.css']
201201
})
202202

203-
export class ModalDialogComponent implements OnInit, AfterContentInit {
203+
export class ModalDialogComponent implements OnInit, AfterContentInit, AfterViewInit {
204204
@Input() title: string;
205205
@Input() componentData: string;
206206
@Input() componentName: any;
207-
public name : any;
207+
@Output() close = new EventEmitter<any>();
208+
public name: any;
209+
public overlayDiv: any;
208210

209211
@ViewChild('datacontainer', { read: ViewContainerRef }) entry: ViewContainerRef;
210212

0 commit comments

Comments
 (0)