For example, we have a file with localized strings
{
"title": "Example title",
"description": "Some text"
}
Let's assume we also have a component with some custom decorator @I18n()
@Component({ ... })
@I18n('./my-translations.json')
export class MyAngularComponent {
}
And template
<h2>{{ i18n.title }}</h2>
<p>{{ i18n.description }}</p>
Is it possible to include one more external resource (besides templateUrl
and styleUrls
) into the component?