Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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>"
  • For more info see the ng2-translate docs

...