0.2.4 • Published 6 years ago

ngx-dialog v0.2.4

Weekly downloads
33
License
MIT
Repository
github
Last release
6 years ago

Notice!

It is a copy of ng-bootstrap modal with only a little change.

You can use ngx-dialog without the dependency of bootstrap or ng-bootstrap.

Getting Started

Installation

npm install ngx-dialog --save-dev

Import to App module

import { NgxDialogModule } from 'ngx-dialog';
@NgModule( {
	imports: [
		...

NgxDialogModule.forRoot(), ], ... } ) export class AppModule { }

Import styles

There are two ways to import the styles .

@import "~ngx-dialog/styles";

in one of you style files.

OR

import "nix-dialog/styles";

in one of your ts files, for example vendor.ts.

Methods

open( content:any, options:NgxDialogOptions )

NgxDialogService

The same as ng-modal, but add some more options:

data

Example

import { Component } from '@angular/core';
import { NgxDialogService }  from 'ngx-dialog';

@Component({

selector: 'page-dialog', template: <button (click)="open(myDialog)">Button</button> <ng-template #myDialog let-c="close"> This dialog looks ugly by default <button (click)="c()">Close</button> </ng-template> }) export class PageDialogComponent { constructor( private ngxDialog: NgxDialogService ) {}

	open( content:any ) {
		this.ngxDialog.open( content, {
			windowClass: 'mydialog'
		} );
	}
}

Tips

  • The custom styles need to be put in the global scope style if the container of the dialog is body.
0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago