mathijsblok / ngx-alerts Goto Github PK
View Code? Open in Web Editor NEWAlert service for Angular
License: MIT License
Alert service for Angular
License: MIT License
I have added ngx tag in my template but the alert message is not showing.
<ngx-alerts></ngx-alerts>
<form>
..........
</form>
I think it's maybe because of the complex structure of my project. I have multiple modules.
First I added these imports in my main app module.
// app.module.ts
imports: [
BrowserAnimationsModule,
BrowserModule,
AlertModule.forRoot({ maxMessages: 5, timeout: 5000, position: 'right' })
],
After it didn't work, I also added the Alert Module import in the local module file
// vendor.module.ts
@NgModule({
imports: [
AlertModule.forRoot({ maxMessages: 5, timeout: 5000, position: 'right' })
],
Please guide me, how can I resolve this issue? Thanks
Regardless of where I put <ngx-alerts></ngx-alerts>
, the alert always appears in the same location. I use Bootstrap 4, with "container". Horizontally speaking the alert is partly inside the container area and partly outside of it, in the otherwise empty side gutters. Vertically speaking, it is always over my navbar; I think it would look better at the top of the page "body".
That said, thanks for this component; it's save me some time and effort.
I'm getting this import warning with Angular 9:
Warning: Entry point 'ngx-alerts' contains deep imports into '/Users/*****/*****/*****/node_modules/rxjs/internal/operators'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
The correct import path should be
import { debounceTime, map, startWith, tap } from 'rxjs/operators';
It was a little unhandy to find the corresponding github page from the npm site. This can be fixed by adding this, which will show up as repository link in npm.
package.json
"repository": {
"type": "git",
"url": "https://github.com/MathijsBlok/ngx-alerts"
},
After refering to documentation, I came to know that this library is supporting only top right and top left position.
Is there any way to poistion alert to bottom of the page ?
It would to great, If it can be extended to position alert to bottom.
Thanks in Advance :)
Since version 10.1.1, the alert appears always on the left side, no matter I configured it to be on the right side.
AlertModule.forRoot({ maxMessages: 10, timeout: 10000, positionX: 'right' }),
I'm unable to close alert programmatically, please add a sample snippet.
Hi I would like to use your library in a university project.
When using the library i get the following compiler error:
ERROR in node_modules/ngx-alerts/lib/component/alert.component.d.ts(13,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/ngx-alerts/lib/service/alert.service.d.ts(10,9): error TS1086: An accessor cannot be declared in an ambient context.
Hi cool module !
I am wondering how can we translate the message ?
ERROR Error: Uncaught (in promise): Error: Template parse errors:
'ngx-alerts' is not a known element:
Imported as follows,
import { AlertService,AlertComponent } from 'ngx-alerts';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.