Skip to content

Commit

Permalink
chore(demos): fix modal event,confirm window,modal event (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
5earle authored and valorkin committed Mar 16, 2018
1 parent 7dabe96 commit 4494459
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/src/app/components/+modal/demos/events/events.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button type="button" class="btn btn-primary" (click)="showModal()">Open a modal</button>
<br><br>
<pre *ngFor="let message of messages">{{message}}</pre>
<pre class="card card-block card-header" *ngFor="let message of messages">{{message}}</pre>

<div class="modal fade" bsModal #modal="bs-modal" tabindex="-1" role="dialog"
aria-labelledby="mySmallModalLabel" aria-hidden="true"
Expand Down
8 changes: 7 additions & 1 deletion demo/src/app/components/+modal/demos/events/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { ModalDirective } from 'ngx-bootstrap/modal';

@Component({
selector: 'demo-modal-events',
templateUrl: './events.html'
templateUrl: './events.html',
styles: [`
.card {
margin-bottom: 0.75rem;
padding: 8px;
}
`]
})
export class DemoModalEventsComponent {
@ViewChild(ModalDirective) modal: ModalDirective;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button type="button" class="btn btn-primary" (click)="openModal(template)">Open modal</button>
<br><br>
<pre>{{message}}</pre>
<pre class="card card-block card-header">{{message}}</pre>
<ng-template #template>
<div class="modal-body text-center">
<p>Do you want to confirm?</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button type="button" class="btn btn-primary" (click)="openModal(template)">Open modal</button>
<br><br>
<pre *ngFor="let message of messages">{{message}}</pre>
<pre class="card card-block card-header" *ngFor="let message of messages">{{message}}</pre>
<ng-template #template>
<div class="modal-header">
<h4 class="modal-title pull-left">Modal</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import 'rxjs/add/observable/combineLatest';

@Component({
selector: 'demo-modal-service-events',
templateUrl: './service-events.html'
templateUrl: './service-events.html',
styles: [`
.card {
margin-bottom: 0.75rem;
padding: 8px;
}
`]
})
export class DemoModalServiceEventsComponent {
modalRef: BsModalRef;
Expand Down

0 comments on commit 4494459

Please sign in to comment.