All Projects â†’ ajwhite â†’ angular-translate-once

ajwhite / angular-translate-once

Licence: other
💱 Extension of angular-translate for one time bindings

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to angular-translate-once

webpack-angular-translate
Webpack plugin for angular-translate
Stars: ✭ 15 (-71.7%)
Mutual labels:  angular-translate

angular-translate-once

License Build Status Dependency Status

angular-translate-once is an extension of angular-translate by introducing one-time bindings for static content.

By default, all of your translations beocme part of the digest cycle and bloat your application's $watch list. You don't really need to observe any changes for things like

  • form labels
  • input placeholders
  • link text/titles
  • static copy

These things really only need to bind once. If you're looking to trim any excess watchers from your application, and you use angular-translate, this directive may help you out.

Example Usage

<label translate-once="EMAIL_ADDRESS"></label>
<input type="email" translate-once-placeholder="SAMPLE_EMAIL_ADDRESS" />
<p translate-once="DYNAMIC_CONTENT" translate-values="{standard: 'object'}"></p>

This should all look very familiar, the only difference is -once in the directive name, and that the translation will be applied as soon as the directive is linked.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].