Comments (15)
Released 3.2.3 that includes a UMD packed toastr.umd.js You should load this the same way you load other UMD packed packages. https://github.com/scttcper/toastr-ng2#systemjs
I copied the UMD packing config from ng-bootstrap and didn't test it, good luck.
from ngx-toastr.
Is there an issue with npm or did you unpublish 3.2.3? I cannot install it to test this.
from ngx-toastr.
@yarrgh looks like it didn't go. Try again now.
from ngx-toastr.
toastr.umd.js came down for me just now. Seems a bit large for such a small library.
from ngx-toastr.
that umd.js file isn't going to work. It's designed for bootstrap. It throws errors like "Cannot read property 'defaultDoc' of null"
from ngx-toastr.
Full error:
TypeError: Cannot read property 'defaultDoc' of null
at _document (http://localhost:3000/node_modules/toastr-ng2/toastr.umd.js:3238:101)
at AppModuleInjector.get (/AppModule/module.ngfactory.js:39:83)
at AppModuleInjector.get (/AppModule/module.ngfactory.js:74:106)
at AppModuleInjector.get (/AppModule/module.ngfactory.js:79:110)
at AppModuleInjector.get (/AppModule/module.ngfactory.js:99:87)
at AppModuleInjector.getInternal (/AppModule/module.ngfactory.js:244:49)
at AppModuleInjector.NgModuleInjector.get (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:8913:48)
at ComponentFactory.create (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:7700:48)
at ApplicationRef_.bootstrap (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:8672:61)
at eval (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:8501:93)
at Array.forEach (native)
at PlatformRef_._moduleDoBootstrap (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:8501:46)
at eval (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:8453:31)
at ZoneDelegate.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:229:26)
at Object.onInvoke (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:4405:41)
from ngx-toastr.
Dang... what is defaultdoc... How are you guys testing this? Are there other packages that do this?
@clabough I see what you're saying theres a DomAdapter in there and stuff.
i put it all in https://github.com/scttcper/toastr-ng2/blob/master/rollup.js
Its run via ./stage-release.sh which prepares a ./deploy folder. Feel free to play around.
from ngx-toastr.
I'm using the quickstart
from ngx-toastr.
I think I have a working umd file. I compiled the source like normal but modified the rollup.js file to the following:
export default {
entry: './deploy/toastr.js',
dest: './deploy/toastr.umd.js',
format: 'umd',
moduleName: 'toastrng2',
globals: {
'@angular/core': 'ng.core',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/http': 'ng.http',
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx'
}
};
And then used rollup to target that rollup.js as a config file. For example node_modules\.bin\rollup -c rollup.js
.
The umd file is now much leaner and works correctly with systemjs.
from ngx-toastr.
If you want I can create a pull request for you to review
from ngx-toastr.
Yeah, please do.
from ngx-toastr.
That's looking pretty good to me so far.
from ngx-toastr.
released 3.2.4
edit: oops wrong button.
from ngx-toastr.
So far it's working great with the quickstart app.
@clabough @cmk1523 can you guys install 3.2.4 and make sure it works in your projects?
from ngx-toastr.
working for me. thank you.
from ngx-toastr.
Related Issues (20)
- i change toaster version that was my problem HOT 2
- Dynamically show/hide all of the displayed toasts
- Toastr not working in Angular 15.2.0
- How to add a popup animation?
- enableHtml removes svg in html string
- ToastrService/ToastrModule import cost is too much HOT 1
- .clear() on duplicate toast
- ngx-toastr not displaying until I refresh the page HOT 4
- Incorrect Position CSS HOT 2
- ngx-toaster not imported in angular 17 HOT 3
- Unable to modify Toast CSS HOT 1
- toast timeOut not working for latest version HOT 1
- Error: Can't resolve '~ngx-toastr/toastr.css' in HOT 4
- maxOpened doesn't work HOT 1
- Error: node_modules/ngx-toastr/toastr/toast-injector.d.ts:47:5 - error TS2416: Property 'get' in type 'ToastInjector' is not assignable to the same property in base type 'Injector'. HOT 1
- How to include Emojis in toastr message HOT 2
- v. 17.0.1: TypeError: Cannot read properties of undefined (reading 'config') HOT 3
- cannot read properties of undefined (reading "toastrService") HOT 3
- Upgrade my project and my external third library from Angular 11 to 12 fails because of a dependency to "ngx-toastr" in my library HOT 2
- ToastContainerModule not found in 16.x.x HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-toastr.