1.0.0 • Published 6 years ago
ngx-simple-dialog v1.0.0
DOCS
Installation
To install this library, run:
$ npm install ngx-simple-dialog --save
Usage
Import SimpleDialogModule
in your app.module.ts
import { NgModule } from '@angular/core';
import { SimpleDialogModule } from 'ngx-simple-dialog';
import {DialogComponent} from './dialog/dialog.component';
...
@NgModule({
declarations: [
// Your component that you want to use as a dialog
DialogComponent
...
],
imports: [
SimpleDialogModule.forRoot()
],
entryComponents: [
// Do not forget to add the component to the entryComponents.
DialogComponent
],
...
})
In your component where you want to use the Dialog Service
import { Component } from '@angular/core';
...
import {DialogService} from 'ngx-simple-dialog';
// Your component that you want to use as a dialog
import {DialogComponent} from './dialog/dialog.component';
...
@Component({
selector: 'home', // <home></home>
styleUrls: [ './home.component.scss' ],
templateUrl: './home.component.html',
...
})
export class HomeComponent {
deviceInfo = null;
...
constructor(private dialogService: DialogService) {}
...
openDialog() {
// Passing the component to open
this.dialogService.open(DialogComponent, {
// data for dialog
})
}
}
Dialog service
Holds the following properties
- browser
Helper Methods
- open() : The method of opening the modal window. As parameters it takes the component and the data, if needed, to transmit the dialog
- close() : Closes the modal window
1.0.0
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago