Page History
...
- Don't hard code user-facing text in components. We're using ng2-translate for i18n. You use it by adding your key to resources/i18n/en.json, and then using that key in the component with the
translate
pipe. e.g.:- in en.json put:
"my-route.my-component.my-label-descriptor": "My User Facing Text";
- in your component put:
"<h1>{{ 'my-route.my-component.my-label-descriptor' | translate }}</h1>"
- in en.json put:
- For more info see the ng2-translate docs
...
Overview
Content Tools