Closed kristoffergustavsson closed 7 years ago
A complement to this bug report. There is nothing wrong with the actual modules. If I add the ts-files in my project and compile it with them, they work and the CLI compiles the project. I think it has something to do with the js-files being built as system modules. The CLI doesn't seem to like that. The tsconfig when compiling should use es2015 modules so tree shaking can be done. I don't really know how to build a node module that works in both environment. ng-bootstrap is packaged in a similar way but use webpack and it works with the CLI.
+1
The library needs to be built with ngc compiler instead of tsc as described here
@akserg are you going to make this changes to support compilation with ngc?
+1
+1
Hi All, Sorry for the delayed response. I have merged the aot into the master branch, and AOT must be available from version 2.2.0. Please try it and let me know about all issues you will have.
I tried 2.2.0. I get this error while building AOT.
Can't bind to 'ngClass' since it isn't a known property of 'div'. (" <div id="toasty" [ERROR ->][ngClass]="[position]"> <ng2-toast *ngFor="let toast of toasts" [toast]="toast" (closeToast)="): ToastyComponent@1:21 Can't bind to 'ngForOf' since it isn't a known property of 'ng2-toast'.
Hi @Marcelh29, That issue was fixed in 2.2.1. Please use latest 2.2.2 from npm.
@akserg Thanks! problem is solved.
Thank you for your patient.
app.module: