https://github.com/atticoos/angular-translate-once
:currency_exchange: Extension of angular-translate for one time bindings
https://github.com/atticoos/angular-translate-once
angular angular-translate javascript translation
Last synced: 18 days ago
JSON representation
:currency_exchange: Extension of angular-translate for one time bindings
- Host: GitHub
- URL: https://github.com/atticoos/angular-translate-once
- Owner: atticoos
- Created: 2015-03-29T23:10:46.000Z (about 11 years ago)
- Default Branch: develop
- Last Pushed: 2017-03-18T03:43:04.000Z (about 9 years ago)
- Last Synced: 2026-02-08T20:35:03.346Z (about 2 months ago)
- Topics: angular, angular-translate, javascript, translation
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 53
- Watchers: 4
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-translate-once
[](http://bower.herokuapp.com/packages/angular-translate-once)
[](http://travis-ci.org/ajwhite/angular-translate-once)
[](https://gemnasium.com/ajwhite/angular-translate-once)
`angular-translate-once` is an extension of [`angular-translate`](https://github.com/angular-translate/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](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$watch). 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`](https://github.com/angular-translate/angular-translate), this directive may help you out.
## Example Usage
```html
```
```html
```
---
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.