-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(modal): add demo for modal window with one tooltip and one popov…
…er in the body of the modal (#3871) * docs(modal): update branch from development, fix conflicts * docs(modal): change name of section and description
- Loading branch information
Showing
5 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
demo/src/app/components/+modal/demos/modal-with-popups/modal-with-popups.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<button type="button" class="btn btn-primary" (click)="openModal(template)">Open modal</button> | ||
<ng-template #template> | ||
<div class="modal-header"> | ||
<h4 class="modal-title pull-left">Modal</h4> | ||
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque delectus enim esse excepturi, impedit, | ||
iste magnam officia optio, quam quis quisquam saepe sint unde velit vitae! Animi in iusto ut?</p> | ||
<button type="button" class="btn btn-primary" popover="Vivamus sagittis">popover</button> | ||
<button type="button" class="btn btn-primary" tooltip="Vivamus sagittis">tooltip</button> | ||
</div> | ||
</ng-template> |
16 changes: 16 additions & 0 deletions
16
demo/src/app/components/+modal/demos/modal-with-popups/modal-with-popups.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, TemplateRef } from '@angular/core'; | ||
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; | ||
|
||
@Component({ | ||
selector: 'demo-modal-with-popups', | ||
templateUrl: './modal-with-popups.html' | ||
}) | ||
export class DemoModalWithPopupsComponent { | ||
modalRef: BsModalRef; | ||
|
||
constructor(private modalService: BsModalService) {} | ||
|
||
openModal(template: TemplateRef<any>) { | ||
this.modalRef = this.modalService.show(template); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters