News for hackers. Stuff that matters.
Re:Angular 5.0.0 by hanspragt on Wednesday November 01, 2017 @02:38PM (#15604200)
Has anyone had success using the AOT tools to build a package of reusable angular components? I was able to use AOT pretty easily for a stand-alone app, but keep running into issues when trying to create a shareable component, and there is not a lot of documentation around this.
Re:Angular 5.0.0 by rickcnagy on Wednesday November 01, 2017 @03:19PM (#15604627)
I have for my day job, but it's _hard_. There isn't a lot of good info out there. Here are a few good sources that I found helpful:

https://medium.com/@isaacplmann/getting-your-angular-2-libra... http://dbarnes.me/writing-an-aot-compliant-angular-library/ https://angular.io/guide/aot-compiler https://angular.io/guide/metadata

Re:Angular 5.0.0 by tashoecraft on Wednesday November 01, 2017 @03:54PM (#15604882)
Yes, but it can be terrible. Suggestion is to take one of the angular library generators. They really need proper docs on how to set this up properly.
Re:Angular 5.0.0 by harunurhan on Wednesday November 01, 2017 @05:48PM (#15605796)
I have, but by using ngc in my gulp build task (had to use gulp for the reason below), unfortunately couldn't make it incremental at that time, so it takes several seconds to re-build when the source is changed.

There is actually another problem when you want to develop reusable UI component library project is that you have to inline style files and template file into ts component.

Re:Angular 5.0.0 by hanspragt on Wednesday November 01, 2017 @05:55PM (#15605853)
> There is actually another problem when you want to develop reusable UI component library project is that you have to inline style files and template file into ts component.

We have a webpack-based process, and using the angular2-template-loader will take care of this for you. Unfortunately, webpack and aot don't mix well.