@@ -24,60 +24,60 @@ import { cycleTabs, getFocusElementList } from "./../common/tab.service";
2424/**
2525 * Component to create modals for presenting content.
2626 *
27- * Using a modal in your application requires `ibm-modal- placeholder` which would generally be
27+ * Using a modal in your application requires `ibm-placeholder` which would generally be
2828 * placed near the end of your app component template (app.component.ts or app.component.html) as:
2929 *
30- * ```html
31- * <ibm-modal-placeholder></ibm-modal-placeholder>
32- * ```
30+ ```html
31+ <ibm-modal-placeholder></ibm-modal-placeholder>
32+ ```
3333 *
3434 * A more complete example for `Modal` is given as follows:
3535 *
3636 * Example modal definition:
3737 *
38- * ```typescript
39- * \@Modal()
40- * \@Component({
41- * selector: "app-sample-modal",
42- * template: `
43- * <ibm-modal size="xl">
44- * <ibm-modal-header (closeSelect)="closeModal()">Header text</ibm-modal-header>
45- * <section class="modal-body">
46- * <h1>Sample modal works.</h1>
47- * <button class="btn--icon-link" nPopover="Hello there" title="Popover title" placement="right" appendInline="true">
48- * <ibm-icon icon="info" size="sm"></ibm-icon>
49- * </button>
50- * {{modalText}}
51- * </section>
52- * <ibm-modal-footer><button ibmButton="primary" (click)="closeModal()">Close</button></ibm-modal-footer>
53- * </ibm-modal>`,
54- * styleUrls: ["./sample-modal.component.scss"]
55- * })
56- * export class SampleModal extends BaseModal {
57- * modalText: string;
58- * constructor(protected injector: Injector) {
59- * super();
60- * this.modalText = this.injector.get("modalText");
61- * }
62- * }
63- * ```
38+ ```typescript
39+ @Component ({
40+ selector: "app-sample-modal",
41+ template: `
42+ <ibm-modal size="xl" (overlaySelected)="closeModal()">
43+ <ibm-modal-header (closeSelect)="closeModal()">Header text</ibm-modal-header>
44+ <section class="modal-body">
45+ <h1>Sample modal works.</h1>
46+ <button class="btn--icon-link" nPopover="Hello there" title="Popover title" placement="right" appendInline="true">
47+ <ibm-icon icon="info" size="sm"></ibm-icon>
48+ </button>
49+ {{modalText}}
50+ </section>
51+ <ibm-modal-footer><button ibmButton="primary" (click)="closeModal()">Close</button></ibm-modal-footer>
52+ </ibm-modal>`,
53+ styleUrls: ["./sample-modal.component.scss"]
54+ })
55+ export class SampleModal extends BaseModal {
56+ modalText: string;
57+ constructor(protected injector: Injector) {
58+ super();
59+ this.modalText = this.injector.get("modalText");
60+ }
61+ }
62+ ```
6463 *
6564 * Example of opening the modal:
6665 *
67- * ```typescript
68- * \ @Component({
69- * selector: "app-modal-demo",
70- * template: `
71- * <button ibmButton="primary" (click)="openModal('drill')">Drill-down modal</button>
72- * <ibm-modal- placeholder></ibm-modal -placeholder>`
73- * })
74- * export class ModalDemo {
75- * openModal() {
76- * this.modalService.create({component: SampleModal, inputs: {modalText: "Hello universe."}});
77- * }
78- * }
79- * ```
66+ ```typescript
67+ @Component ({
68+ selector: "app-modal-demo",
69+ template: `
70+ <button ibmButton="primary" (click)="openModal('drill')">Drill-down modal</button>
71+ <ibm-placeholder></ibm-placeholder>`
72+ })
73+ export class ModalDemo {
74+ openModal() {
75+ this.modalService.create({component: SampleModal, inputs: {modalText: "Hello universe."}});
76+ }
77+ }
78+ ```
8079 *
80+ * <example-url>https://angular.carbondesignsystem.com/iframe.html?id=modal--basic</example-url>
8181 */
8282@Component ( {
8383 selector : "ibm-modal" ,
@@ -124,7 +124,7 @@ export class Modal implements AfterViewInit, OnInit, OnDestroy {
124124 @Input ( ) modalLabel = "default" ;
125125
126126 /**
127- * Emits event when click occurs within `n-overlay` element. This is to track click events occuring outside bounds of the `Modal` object.
127+ * Emits event when click occurs within `n-overlay` element. This is to track click events occurring outside bounds of the `Modal` object.
128128 */
129129 @Output ( ) overlaySelected = new EventEmitter ( ) ;
130130 /**
@@ -142,7 +142,7 @@ export class Modal implements AfterViewInit, OnInit, OnDestroy {
142142 modalState : "in" | "out" = "out" ;
143143
144144 /**
145- * An element should have 'data- modal-primary-focus' as an attribute to receive initial focus within the `Modal` component.
145+ * An element should have 'modal-primary-focus' as an attribute to receive initial focus within the `Modal` component.
146146 */
147147 selectorPrimaryFocus = "[modal-primary-focus]" ;
148148
0 commit comments