
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
angular-dialog-service
Advanced tools
A service to handle common dialog types in a web application. Built on top of Angular-Bootstrap's modal
Please use one of the release versions rather than the Master Branch. The Master Branch has untested merges and changes and is a work in progress. I urge you to always use a release version rather than linking directly to the Master Branch, as the Master Branch may change and may not always be backward compatible.
v4.x.x + is not backward compatible with versions 1,2,3,3.1 Please refer to the changes section to view what is different in v4.0
A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap, Twitter Bootstrap and Font-Awesome. Supports, i18n, language translations for dialog headers, messages and buttons via angular-translate.
bower install angular-dialog-service --save
var app = angular.module("MyApp", ['dialogs.main']);
app.controller("MyCtrl", function(dialogs){
// open dialogs here
});
dialogs.error('Error','An unknown error occurred preventing the completion of the requested action.');
dialogs.wait('Creating User','Please wait while we attempt to create user "Michael Conroy."<br><br>This should only take a moment.',50);
dialogs.notify('Something Happened','Something happened at this point in the application that I wish to let you know about');
dialogs.create('url/to/a/template','ctrlrToUse',{data: topass,anotherVar: 'value'},{},'ctrl');
All Dialogs return a object with property result
which is a promise OK/Yes
resolves the promise Close/Reject/No
rejects the promise
dialogs.error(header, msg, opts)
dialogs.notify(header, msg, opts)
dialogs.confirm(header, msg, opts)
Name | Type | Description |
---|---|---|
header | string | Dialog header text. |
msg | string | Dialog body text. |
opts | object<IDialogOptions> | Options for the dialog |
dialogs.wait(header, msg, progress, opts)
Name | Type | Description |
---|---|---|
header | string | Dialog header text. |
msg | string | Dialog body text. |
progress | int | progress in percentage |
opts | object<IDialogOptions> | Options for the dialog |
dialogs.create(url, ctrlr, data, opts, ctrlAs)
Name | Type | Description |
---|---|---|
url | string | Template Url |
ctrlr | string | Dialog Controller |
data | object | data available as a "data" service in the controller |
opts | object<IDialogOptions> | Options for the dialog with the addition of `copy: false |
ctrlAs | string | controllerAs reference |
Note: All properties are optional
Name | Type | Description |
---|---|---|
animation | boolean | Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed. |
backdrop | `boolean | string` |
keyboard | boolean | indicates whether the dialog should be closable by hitting the ESC key |
backdropClass | string | additional CSS class(es) to be added to a modal backdrop template |
windowClass | string | additional CSS class(es) to be added to a modal window template |
size | string | Optional suffix of modal window class. The value used is appended to the modal- class, i.e. a value of sm gives modal-sm . |
TODO: Add more usage explanations.
Re-introduction of the [opts] parameter to dialogs methods. I had many complaints about removing method level options in favor of wholly using the provider instead.
Bootstrap 3.1.1 / Angular UI Bootstrap 0.11.0 introduced a size property for dialogs. This can be controlled via the provider or by the optional sz parameter to the dialog methods.
Removed opts and static parameters from dialog methods in favor of provider settings. The dialogs service is now longer $dialogs, the $ has be removed as this is reserved for Angular core services.
Predefined dialogs/modals.
Same as v4.0.0 with the exception of the following:
Included a css file that has a .modal class fix for Bootstrap and also has some predefined styles for the various modals described in the service.
v3.0 css file has the .modal class removed that had been a fix for a Bootstrap 3 display problem. This has since been rectified by Angular UI and Bootstrap.
Optionally pass in options object, possible overrides are as follows
opts = {
'keyboard': true or false
'backdrop': 'static' or true or false
'size': 'sm' or 'lg' //small or large modal size
'windowClass': 'dialogs-default' // additional CSS class(es) to be added to a modal window
'copy': true or false // used only with create custom dialog
}
Supports everything described above in v4.0.0 - v4.1.0 and added the following
dialogsProvider.setSize(['sm','lg']) - This will set modal size application wide, but can be overridden using the sz parameter added to each dialog method call.
Install Dependencies
npm install --dev
bower install
For Browser Testing gulp watch
For Unit Testing npm test
Written with StackEdit.
FAQs
A service to handle common dialog types in a web application. Built on top of Angular-Bootstrap's modal
The npm package angular-dialog-service receives a total of 2,442 weekly downloads. As such, angular-dialog-service popularity was classified as popular.
We found that angular-dialog-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.