# fe-modal

> angular 2+ modal

Latest version **0.0.15** (published 2017-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install fe-modal
pnpm add fe-modal
yarn add fe-modal
bun add fe-modal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2017-12-11 |
| First published | 2017-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | itwang |
| Maintainers | itwang |
| Keywords | angular, modal, popover, window |

## Links

- npm: https://www.npmjs.com/package/fe-modal
- npm.io page: https://npm.io/package/fe-modal

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 0.0.15 (latest) — 2017-12-11
- 0.0.14 — 2017-11-30
- 0.0.13 — 2017-11-30
- 0.0.12 — 2017-11-14
- 0.0.11 — 2017-11-14
- 0.0.10 — 2017-11-14
- 0.0.9 — 2017-11-14
- 0.0.8 — 2017-11-09
- 0.0.7 — 2017-11-09
- 0.0.6 — 2017-11-09
- 0.0.5 — 2017-11-09
- 0.0.4 — 2017-11-09
- 0.0.3 — 2017-11-08

## README

# F.E.Mock [fe-modal](https://www.npmjs.com/package/fe-modal)

## Dependencies

+ Angular >=4.0.0 

## Install

You can get it on npm.

```sh
npm install fe-modal --save
```

## Usage

.angular-cli.json

```ts
"apps": [
    {
        ...
        "styles": [
            "../node_modules/fe-modal/modal.less"
        ],
        ...
    }
]
```

app.module.ts：

```ts
import { ModalModule } from 'fe-modal';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        ...
        ModalModule.forRoot(),
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule {}
```

Use in components：

```ts
import { ModalService } from 'fe-modal';   

@Component({
    selector: 'app-demo',
    templateUrl: './app-demo.component.html',
    styleUrls: ['./app-demo.component.less']
})
export class DemoComponent {

    constructor (private modal: ModalService) {}

    dialog () {
        this.modal.dialog({ template: FormComponent });
    }

    alert () {
        this.modal.alert({ template: 'alert' });
    }

    loading () {
        this.modal.loading({ template: 'loading' });
    }

    remove (id: string) {
        this.modal.confirm({
            template: 'Do not restore after deletion, please operate carefully',
            confirmCallback: () => {
                // code ...
            }
        });
    }
}
```

---
_Source: https://npm.io/package/fe-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
