ngneat / until-destroy

🦊 RxJS operator that unsubscribe from observables on destroy
https://netbasal.com/
MIT License
1.74k stars 100 forks source link

9.1.0 version kills NgxTranslate #190

Closed petrot closed 2 years ago

petrot commented 2 years ago

I have the following component declaration:

@UntilDestroy()
@Component({
  changeDetection: ChangeDetectionStrategy.OnPush,
  selector: 'app-about-page',
  templateUrl: './about.page.html',
  styleUrls: ['./about.page.scss'],
})

With this config, NgxTranslate fails with the following message:

ERROR Error: Uncaught (in promise): Error: NG0302: The pipe 'translate' could not be found in the 'AboutPage' component!.

When I remove the @UntilDestroy() decorator, the translation works well.

This error appeared with v9.1.0.

arturovt commented 2 years ago

Hey @petrot . Thanks for the issue, I was guessing that the change should probably cause something related to that. I was just checking it locally in my apps and haven't encountered any issue. But your case confirms that the issue exists.

I'll keep investigating. Do you use JIT or AOT compilation (what's the value of the aot option in your configuration or it doesn't exist at all)?

Note: the 9.1.0 does not contain any new functionality so you can safely roll back to the previous version.

petrot commented 2 years ago

Hi @arturovt , the bug exists with the default "aot": false settings (build/options in serve mode). When I change it to true, it works well.

arturovt commented 2 years ago

Thanks for confirming.

arturovt commented 2 years ago

I've reverted the change.

petrot commented 2 years ago

Thanks!