{ "title": "Example title","description": "Some text" }
我们假设我们还有一个带有一些自定义装饰器的组件@ I18n()
@Component({ ... }) @I18n('./my-translations.json') export class MyAngularComponent { }
和模板
<h2>{{ i18n.title }}</h2> <p>{{ i18n.description }}</p>
是否可以在组件中包含一个或多个外部资源(除了templateUrl和styleUrls)?