
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
This library was generated with Angular CLI version 16.1.0.
Code Implementation : Let's Program Blog
Recommend to use the latest version of ng-toasty More Compatible with Latest version of Angular
ng-toasty | Angular |
---|---|
current | >= 16.x |
npm i ng-toasty
import { NgModule } from '@angular/core';
import { HeaderComponent } from './component/header/header.component';
import { ToastyModule } from 'ng-toasty' // to be added
@NgModule({
declarations: [
HeaderComponent,
],
imports: [
ToastyModule // to be added
],
})
export class AppModule { }
import { Component } from '@angular/core';
import { ToasterPosition, ToastyService } from 'ng-toasty';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
ToasterPosition = ToasterPosition;
constructor(
private toast: ToastyService //to be injected
) { }
ngOnInit(): void {
}
showSuccess() {
this.toaster.success("This is success Message") //default duration is 2000ms (2secs)
}
showError() {
this.toast.danger("Something went wrong!", 4000); // will hide after 4secs
}
showInfo() {
this.toast.info("information Message!", 4000); // will hide after 4secs
}
showWarn() {
this.toast.warning("your warning message!", 4000); // will hide after 4secs
}
}
<ng-toasty [width]="300" [position]="ToasterPosition.TOP_RIGHT"></ng-toasty>
Check out article on ng-toasty Integration with Angular
MIT
GitHub @SashikumarYadav · Blog @LetsProgram · LinkedIn @SashikumarYadav · Medium @SashikumarYadav
FAQs
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
The npm package ng-toasty receives a total of 35 weekly downloads. As such, ng-toasty popularity was classified as not popular.
We found that ng-toasty 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.