Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sheikalthaf/ngu-alert
Angular universal alert
https://github.com/sheikalthaf/ngu-alert
Last synced: about 7 hours ago
JSON representation
Angular universal alert
- Host: GitHub
- URL: https://github.com/sheikalthaf/ngu-alert
- Owner: sheikalthaf
- Created: 2017-12-03T05:04:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:36:21.000Z (about 1 year ago)
- Last Synced: 2024-03-15T07:49:48.870Z (10 months ago)
- Language: TypeScript
- Size: 339 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ngu-alert
Angular Universal alert
## Installation
`npm install @ngu/alert --save`
## Sample
Include NguAlertModule in your app module:
```javascript
import { NguAlertModule } from '@ngu/alert';@NgModule({
imports: [NguAlertModule]
})
export class AppModule {}
```Then use in your component(s):
```javascript
import { Component, OnInit } from '@angular/core';
import { NguAlertService } from '@ngu/alert';@Component({
selector: 'sample',
template: `Ngu Alert
`,
})
export class SampleComponent implements OnInit {
constructor(private alert: NguAlertService)ngOnInit() {
for (i = 0; i < 4; i++) {
this.alert.open({
heading: 'This is a heading',
msg: 'This is a message from alert',
type: 'success',
duration: 10000
});
}
}
}
```## License
[MIT](LICENSE) license.