Reputation: 127
I'm using akveo/ng2-admin dashboard (latest with angular 4) and tried to use ng2-toastr following the installation doc.
I imported the CSS in the index.html file and declared the ToastModule in the app.module.ts file.
I also imported the ToastsManager in my component and assigned the ViewContainerRef.
The module gets loaded successfully and everything goes without error so far.
But when I call this.toastr.success('You are awesome!', 'Success!');
the text is displayed without using the CSS.
ng2-admin is using WebPack.
Any idea?
Thanks in advance! Serge.
URL toastr: https://github.com/PointInside/ng2-toastr
URL ng2-admin: enter link description here
Upvotes: 0
Views: 410
Reputation: 41
Add
@import '../node_modules/ng2-toastr/ng2-toastr.css';
to ./src/app/theme/theme.cscc
this file is there to add global styles or import other files, that way we can avoid copying files
Upvotes: 0
Reputation: 127
I copied the CSS file in the theme folder and loaded it in the app.component.ts with the following command:
import 'style-loader!./theme/ng2-toastr/ng2-toastr.scss';
Cheers, Serge.
Upvotes: 1