
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@zeeko/notify-lite
Advanced tools
[](https://www.npmjs.com/package/@zeeko/notify-lite) [](https://circleci.com/gh/ZeekoZhu/ngx-notify-lite
A configurable notification system for angular.
yarn add @zeeko/notify-lite
NotifyLiteModule@NgModule({
imports: [
NotifyLiteModule.forRoot(),
],
})
export class AppModule {
}
Add predefined style.less to your app's global scope.
// angular.json
{
"styles": [
"./node_modules/@zeeko/notify-lite/style.less"
]
}
Or import it to your style:
// style.less
@import "./node_modules/@zeeko/notify-lite/style.less"
const data: NotificationData =
{
autoDismiss: false,
message: 'Hello world',
pauseOnHover: true,
autoDismissTimeout: 10000,
type: 'success'
};
class MyComponent {
constructor(private notifyCenter: NotifyCenterService) {}
notify() {
this.notifyCenter.show(data);
}
}
export type NotificationType = 'success' | 'error' | 'warning' | 'info';
export interface NotificationData {
message: string;
type: NotificationType;
autoDismiss: boolean;
pauseOnHover: boolean;
autoDismissTimeout: number;
extraData?: any;
}
NotificationData contains common properties used to create a notification.extraData is used to store additional data for custom notification template.export declare const useComponentTemplate = <T extends NotificationTemplate>(compType: ComponentType<T>) => ComponentPortalFactory<T>
export interface NotificationConfig {
portalFactory: ComponentPortalFactory<NotificationTemplate>;
}
ComponentFactory from a component class.NotificationData.You can replace the default notification template with your own component.
export class AwesomeComponent implements NotificationTemplate {
// Add your implementation here...
}
Use NotifyLiteModule.forRoot to override global configuration.
@NgModule({
imports: [
NotifyLiteModule.forRoot({
protalFactory: useComponentTemplate(AwesomeComponent)
}),
],
})
export class AppModule {
}
Or just pass a custom config to NotifyCenterService.show(data, config) to override the config of the new notification.
const config: NotificationConfig = {
portalFactory: useComponentTemplate(ActionTemplateComponent)
};
this.notifyCenter.show(data, config);
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run yarn build to build the project. The build artifacts will be stored in the dist/ directory.
FAQs
[](https://www.npmjs.com/package/@zeeko/notify-lite) [](https://circleci.com/gh/ZeekoZhu/ngx-notify-lite
We found that @zeeko/notify-lite 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.