robisim74 / angular-l10n

Angular library to translate texts, dates and numbers
MIT License
380 stars 59 forks source link

Missing 'ngOnInit' method #298

Closed Neill83 closed 4 years ago

Neill83 commented 4 years ago

Hi. We are using v8.1.2 and my question is...

Why do we always need to implement OnInit?

public ngOnInit(){}

Could you remove the warning? We are also using AOT compilation and i don't think its needed...

Regards

robisim74 commented 4 years ago

In version v8 of this library, the implementation of the OnInitmethod was necessary for decorators (e.g. @Language), otherwise with AoT enabled the change of language at runtime did not work without reloading: https://github.com/angular/angular/issues/16023

If the warning bothers you, use LogLevel.Off during configuration.