akserg / ng2-toasty

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

[2.2.0] Can't bind to 'ngClass' since it isn't a known property of 'div' #54

Closed chunghha closed 7 years ago

chunghha commented 7 years ago
Can't bind to 'ngClass' since it isn't a known property of 'div'. ("
        <div class="toast" [ERROR ->][ngClass]="[toast.type, toast.theme]">
            <div *ngIf="toast.showClose" class="close-button" "): ToastComponent@1:27
Can't bind to 'ngIf' since it isn't a known property of 'div'. ("
        <div class="toast" [ngClass]="[toast.type, toast.theme]">
            <div [ERROR ->]*ngIf="toast.showClose" class="close-button" (click)="close($event)"></div>
            <div *ngIf="t"): ToastComponent@2:17
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("
        <div class="toast" [ngClass]="[toast.type, toast.theme]">
            [ERROR ->]<div *ngIf="toast.showClose" class="close-button" (click)="close($event)"></div>
            <div *ng"): ToastComponent@2:12

I believe taking out CommonModule from index.ts by this commit causes the errors. https://github.com/akserg/ng2-toasty/commit/7d7c0a837991f5bf7e2e448944d9e285d20725f1

akserg commented 7 years ago

I have the same issue - fixing.

akserg commented 7 years ago

Fixed in 2.2.1 Please confirm.

chunghha commented 7 years ago

It got fixed. Thanks a lot!

akserg commented 7 years ago

I'm still busy testing the latest build, so please, if you find other issues - let me know.