{"id":28992444,"url":"https://github.com/flyingnebulae/angular-popup","last_synced_at":"2026-05-19T05:38:20.372Z","repository":{"id":57102469,"uuid":"142706397","full_name":"FlyingNebulae/angular-popup","owner":"FlyingNebulae","description":"Angular popup module","archived":false,"fork":false,"pushed_at":"2018-08-10T19:52:18.000Z","size":580,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T20:47:15.266Z","etag":null,"topics":["angular","angular-popup","angular2","angular4","angular5","angular6","confirm","dialog","iframe","modal","module","popup"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlyingNebulae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-28T20:00:02.000Z","updated_at":"2018-08-10T19:49:29.000Z","dependencies_parsed_at":"2022-08-20T21:40:51.353Z","dependency_job_id":null,"html_url":"https://github.com/FlyingNebulae/angular-popup","commit_stats":null,"previous_names":["flyingnebulae/angular-popup"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/FlyingNebulae/angular-popup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingNebulae%2Fangular-popup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingNebulae%2Fangular-popup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingNebulae%2Fangular-popup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingNebulae%2Fangular-popup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlyingNebulae","download_url":"https://codeload.github.com/FlyingNebulae/angular-popup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingNebulae%2Fangular-popup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789322,"owners_count":23209783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-popup","angular2","angular4","angular5","angular6","confirm","dialog","iframe","modal","module","popup"],"created_at":"2025-06-25T02:10:56.092Z","updated_at":"2025-10-15T16:03:36.147Z","avatar_url":"https://github.com/FlyingNebulae.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @clementvh/angular-popup\n\n## Description\n\nAn angular module to display popup on screen, supported by angular \u003e= 4.0.0\n\n## Install\n\n```sh\n$ npm install @clementvh/angular-popup\n```\n\n## Basic Usage\n\n### Add PopupModule and your component in your angular root module :\n\n```ts\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { PopupModule } from '@clementvh/angular-popup';\n\nimport { AppComponent } from './app.component';\n\n@NgModule({\n  imports: [\n    BrowserModule,\n    PopupModule\n  ],\n  declarations: [\n    AppComponent\n  ],\n  entryComponents: [MyComponent],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n### Insert the popup component into your root component\n\n```html\n\u003cng-popup\u003e\u003c/ng-popup\u003e\n\n\u003ch1\u003eApp Component\u003c/h1\u003e\n```\n\n### Inject the PopupService into a component :\n\n```ts\nimport { Component } from '@angular/core';\nimport { PopupService } from '@clementvh/angular-popup';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html'\n})\nexport class AppComponent {\n  constructor(public popupService: PopupService) {}\n}\n```\n\n### Call service methods to open a popup :\n\n```ts\nthis.popupService.openHtml(MyComponent, {\n  id: 'toto-popup'\n});\n```\n\n## PopupService's available methods\n\n### openHtml()\nOpen a popup with the given component inside\n\n```ts\n/**\n * @param {Type\u003cany\u003e} component The component to instatiate in the popup.\n * @param {Object} options Options given to the popup.\n */\nopenHtml(component: Type\u003cany\u003e, options: any = {}): void;\n```\n\n### openConfirm()\nOpen a popup confirm with the given title and text and two buttons at the bottom 'Cancel' and 'Confirm'\n\n```ts\n/**\n * @param {string} title The popup's title.\n * @param {string} text The popup(s content text.\n * @param {Object} options Options given to the popup.\n */\nopenConfirm(title: string, text: string, options: any = {}): void;\n```\n\n### openIframe()\nOpen a popup with an iframe to the given url\n\n```ts\n/**\n * @param {string} url The url for the iframe\n * @param {Object} options Options given to the popup.\n */\nopenIframe(url: string, options: any = {}): void;\n```\n\n## Options\nOptions object should be a type of `PopupOptions` interface. The object may have following properties:\n\n- **id** - {string} - CSS class injected on the `.app-popup-container` block.\n- **dismissable** - {boolean} - if `false` clicking outside the popup won't close it.\n- **showClose** - {boolean} - if `false` the close icon won't be displayed.\n- **confirm** - {Function} - Function to call when confirm button is clicked.\n- **cancel** - {Function} - Function to call when cancel button is clicked.\n- **confirmText** - {string} - Text to inject in confirm button.\n- **cancelText** - {string} - Text to inject in cancel button.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingnebulae%2Fangular-popup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyingnebulae%2Fangular-popup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingnebulae%2Fangular-popup/lists"}