<commit_before># Modals

## Example

```ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import {
	NzbService,
	NzbModal,
	NzbModalOptions,
	NzbModalResult
} from 'nowzoo-angular-bootstrap-lite';

```

## Modals API

### NzbService.createModal

`createModal(): NzbModal`

Creates a modal instance.

<commit_msg>modal docs<commit_after># Modals

## Example

The component that creates the modal...

```ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import {
	NzbService,
	NzbModal,
	NzbModalOptions,
	NzbModalResult
} from 'nowzoo-angular-bootstrap-lite';

// import your content component...
import { ExampleModalContentComponent } from './example-modal-content.component';

@Component({
	selector: 'app-modal-demo-1',
	template: `
	<div class="form-group">
		<button class="btn btn-primary" (click)="showModal()">Open Modal</button>
	</div>
	`
})
export class ModalDemo1Component implements OnInit, OnDestroy {
	modal: NzbModal = null;
	result: NzbModalResult = null;
	options: NzbModalOptions;
	constructor(
		private nzbService: NzbService
	) { }

	ngOnInit() {
		this.options = new NzbModalOptions();
		this.modal = this.nzbService.createModal()
	}
	ngOnDestroy() {
		this.modal.destroy();
	}
	showModal() {
		this.modal.closed().then(result => {
			this.result = result;
		});
		this.modal.show(ExampleModalContentComponent, this.options);
	}

}

```

## Modals API

### NzbService.createModal

`createModal(): NzbModal`

Creates a modal instance.


{'fraction_non_alphanumeric': 0.1424731182795699, 'fraction_numerical': 0.0013440860215053765, 'mean_word_length': 4.683206106870229, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '862371', 'n_tokens_mistral': 528, 'n_tokens_neox': 506, 'n_words': 111}