Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
ng2-window-view
Advanced tools
[![NPM](https://nodei.co/npm/ng2-window-view.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/ng2-window-view/) [![NPM](https://nodei.co/npm-dl/ng2-window-view.png?months=3&height=3)](https://nodei.co/npm/ng2-window-view/)
A few of core class for implement window more convenient, and provide collection of common type of modal, dialog components.
WindowViewContainerComponent
- A window component using bootstrap panel
class.
Anything wrap by this will present as content of a window.
Provide some common config.
WindowViewOutletComponent
- An outlet component similar to router-outlet
.
Require WindowViewService
, any window push from WindowViewService
will be placed after outlet component.
WindowViewService
- For management of windows. It treat all windows as a stack.
You can push or pop window from it.
WindowViewLayerService
- Some case, you need multi-floating window feature,
that is what WindowViewLayerService
do.
If a WindowViewContainerComponent
enable floating
and
disable showBackground
, it will be push into WindowViewLayerService
.
All windows in WindowViewLayerService
can change z-index
by clicking
component.
ConfirmDialog
$ npm install --save ng2-window-view
import { NgModule } from '@angular/core';
import { WindowViewModule } from 'ng2-window-view';
import { MyWindowComponent } from './my-window-component';
@NgModule({
imports: [
WindowViewModule
],
entryComponents: [
// window component have to provide a component factory,
// by adding component to `entryComponents`.
MyWindowComponent
]
})
export class AppModule {}
import { Component } from '@angular/core';
import { WindowViewContainerComponent } from 'ng2-window-view';
@Component({
selector: 'my-window',
template: `
<window-view-container [heading]="windowTitle">
It's a window!!
</window-view-container>`
})
export class MyWindowComponent {
windowTitle: string = 'Title here!';
}
import { Component, ComponentRef } from '@angular/core';
import { WindowViewOutletComponent, WindowViewService } from 'ng2-window-view';
import { MyWindowComponent } from './my-window';
@Component({
selector: 'app-root',
template: `
<button (click)="openWindow()">Open Window</button>
<window-view-outlet></window-view-outlet>
`,
providers: [WindowViewService]
})
export class AppComponent {
constructor(private windowView: WindowViewService) {}
openWindow() {
this.windowView.pushWindow(MyWindowComponent);
}
}
FAQs
[![NPM](https://nodei.co/npm/ng2-window-view.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/ng2-window-view/) [![NPM](https://nodei.co/npm-dl/ng2-window-view.png?months=3&height=3)](https://nodei.co/npm/ng2-window-view/)
We found that ng2-window-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.