1.1.7 • Published 7 years ago

ng2-popups v1.1.7

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

npm version

NPM

ng2-popups

Popups for angular 2 : load dynamically your components into a popup. Minimal style and html for easy personalization. This library use ng2-component-injector. See example/ if needed.

Install

npm install ng2-popups --save
@NgModule({
    providers: [PopupModule],
    declarations: [ /* Put here your components to be injected */ ],
    entryComponents: [ /* Put here your components to be injected */  ],
})
export class AppModule { }

And put <utx-popups></utx-popups> into your main component template.

Into your SystemJs config you'll need to put :

packages: {
	'ng2-component-injector', {
		main: 'bundles/ng2-component-injector.js',
		defaultExtension: 'js'
	}
}

Documentation

PopupService

open

open(config: any):Promise<PopupComponent>>

Open a new popup and inject a component inside. Return a promise resolved when the popup is opened.

config :

{
    component: any; // the component to inject
    inputs?:any; // {Object} the inputs to pass to the component
    outputs?:any; // {Object} the outputs to listen to the component
}

close

close(popup: PopupComponent):Promise<any>

Close a popup. Return a promise resolved when the popup is closed.

closeAll

closeAll():Promise<any>

Close all popups. Return a promise resolved when all popups are closed.

PopupComponent

close

close():Promise<any>

Close the popup. Return a promise resolved when the popup is closed.

closePromise

closePromise:Promise<any>

A promise resolved when the popup is closed.

element

element:HTMLElement

The DOM element of the popup (can be use to add class, etc...).

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago