Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
angular2-bootstrap-confirm
Advanced tools
https://mattlewis92.github.io/angular2-bootstrap-confirm/
A simple angular2 directive to display a bootstrap styled confirmation popover when an element is clicked.
Pull requests are welcome.
Install through npm:
npm install --save angular2-bootstrap-confirm
Then use it in your app on a component:
import {Component} from '@angular/core';
import {ConfirmOptions, Position} from 'angular2-bootstrap-confirm';
import {Positioning} from 'angular2-bootstrap-confirm/position/position';
// Or if you're already using the @ng-bootstrap/ng-bootstrap module
// import {Positioning} from '@ng-bootstrap/ng-bootstrap/util/positioning';
// or if you're using the ng2-bootstrap module
// import {PositionService as Positioning} from 'ng2-bootstrap/components/position';
@Component({
selector: 'my-component',
providers: [ // you can pass both of these when bootstrapping the app to configure globally throughout your app
ConfirmOptions,
// this is required so you can use the bundled position service rather than rely on the `@ng-bootstrap/ng-bootstrap` module
{provide: Position, useClass: Positioning}
],
template: `
<button
class="btn btn-default"
mwlConfirm
[title]="title"
[message]="message"
placement="left"
(confirm)="confirmClicked = true"
(cancel)="cancelClicked = true"
[(isOpen)]="isOpen">
Click me!
</button>
`
})
class MyComponent {
public title: string = 'Popover title';
public message: string = 'Popover description';
public confirmClicked: boolean = false;
public cancelClicked: boolean = false;
public isOpen: boolean = false;
}
// now use within your apps module
import {NgModule} from '@angular/core';
import {ConfirmModule} from 'angular2-bootstrap-confirm';
@NgModule({
declarations: [MyComponent],
imports: [ConfirmModule],
bootstrap: [MyComponent]
})
class MyModule {}
You may also find it useful to view the demo source.
<script src="node_modules/angular2-bootstrap-confirm/position/position.js"></script>
<script src="node_modules/angular2-bootstrap-confirm/angular2-bootstrap-confirm.js"></script>
<script>
// position service available as ng2BootstrapPosition.Positioning
// confirm options, directive and position token available as ng2BootstrapConfirm.ConfirmOptions, ng2BootstrapConfirm.Confirm, ng2BootstrapConfirm.Position
</script>
You will need to add this line in your server bootstrap code to get this module to work with universal:
(global as any).HTMLElement = () => {};
All documentation is auto-generated from the source via typedoc and can be viewed here: https://mattlewis92.github.io/angular2-bootstrap-confirm/docs/
The main confirm directive options can be viewed here.
npm install
while current directory is this repoRun npm start
to start a development server on port 8000 with auto reload + tests.
Run npm test
to run tests once or npm run test:watch
to continually run tests.
npm run release
MIT
0.11.0 (2016-09-24)
Before:
node_modules/angular2-bootstrap-confirm/angular2-bootstrap-confirm.js
After:
node_modules/angular2-bootstrap-confirm/dist/umd/angular2-bootstrap-confirm.js
<a name="0.10.2"></a>
FAQs
An angular2 bootstrap confirmation popover
The npm package angular2-bootstrap-confirm receives a total of 9 weekly downloads. As such, angular2-bootstrap-confirm popularity was classified as not popular.
We found that angular2-bootstrap-confirm 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.