I want to use Angular's translations into component files and I've seen that the best way for this is to use the $localize() function like this:
export class AppComponent {
componentTranslation= 'Translated with localize funcion';
translation = $localize`The follwing message is ${this.componentTranslation}`;
}
The problem is that I get the following error message: Module not found: Error: Can't resolve '@angular/localize/src/localize' in ...
I'm using the version 9.1.4 of angular, the same version for @angular/localize module, but I've also tried updating them to 11.0.3 and I;ve ot the same errors.
The module is imported the polyfills.ts files and was done automatically by running the ng add @angular/localize command.
Does anyone encountered this error and has any idea what should I do?