akserg / ng2-toasty

Angular2 Toasty component shows growl-style alerts and messages for your app.
MIT License
283 stars 102 forks source link

Toast with no style #8

Closed pwasilewski closed 8 years ago

pwasilewski commented 8 years ago

Hello,

I installed your component but when I click on my button the message appears and disappears but without any css : capture d ecran 2016-04-13 a 16 30 45

Could you help me find my error :/

System.config({
            defaultJSExtensions: true,
            packages: {
                angular2: { defaultExtension: false },
                rxjs: { defaultExtension: false }
            },
            map: {
                'ng2-toasty': 'node_modules/ng2-toasty',
                'ng2-dnd': 'node_modules/ng2-dnd',
                'ng2-bs3-modal': 'node_modules/ng2-bs3-modal'
            }
      });
import {ToastyService, ToastyConfig} from 'ng2-toasty/ng2-toasty';

bootstrap(AppComponent, [ROUTER_PROVIDERS, HTTP_PROVIDERS, DND_PROVIDERS, ToastyService, ToastyConfig]);
import {ToastyService, ToastyConfig, Toasty, ToastOptions, ToastData} from 'ng2-toasty/ng2-toasty';
...
directives: [DND_DIRECTIVES, MODAL_DIRECTIVES, SpinnerComponent, RouterLink, CreateSectionComponent, Toasty],
...
constructor(private _service: DocumentsService, private _router: Router, private _routeParams: RouteParams, private toastyService:ToastyService) { }

    output() {
        this.toastyService.default('Hi there');    
    }

And I add <ng2-toasty></ng2-toasty> in the html file.

Thank you for your time.

akserg commented 8 years ago

Hi,

Did you add ng2-toasty.css in your index.html file?

<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="node_modules/ng2-toasty/ng2-toasty.css">
...
pwasilewski commented 8 years ago

It's working perfectly fine now ! Thank you for your help and your components ! :)