Hello Guillaume,
I’m sorry to say there’s no way doing it work as this comment in github says. Briefly, the whole github issue explains the imposibility of having working a component hook added from a class decorator in AOT unless this hook is explicitly (statically) defined in the component itself.
It’s nice to see that Netanel Basal struggled also with this issue so when you have time, could you update the article to reflect this AOT behaviour? I know there’s so much things to do but it would be great reading this in the post body. Thanks!
You can came up with a solution by forcing the inclusion of the mandatory hooks through an interface along the decorator.
Another option less idiomatic is dropping the decorator and extend a class that does the same with the hooks. This way works with AOT and forget the redundant decorator+interface solution.
It’s up to you decide whaterver you like. Or maybe you end up with another idea.
Hope it helps.
