https://github.com/johnnythetank/angular-balance-text
AngularJS Wrapper for jQuery balance-text for implementing balancing of wrapping text in a web page
https://github.com/johnnythetank/angular-balance-text
Last synced: 4 months ago
JSON representation
AngularJS Wrapper for jQuery balance-text for implementing balancing of wrapping text in a web page
- Host: GitHub
- URL: https://github.com/johnnythetank/angular-balance-text
- Owner: JohnnyTheTank
- License: mit
- Created: 2016-03-30T13:50:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-25T07:44:33.000Z (about 10 years ago)
- Last Synced: 2025-02-21T16:13:52.353Z (over 1 year ago)
- Language: HTML
- Size: 66.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-balance-text
AngularJS Wrapper for [jQuery balance-text](https://github.com/adobe-webplatform/balance-text) for implementing balancing of wrapping text in a web page
[](https://badge.fury.io/js/angular-balance-text)
[](https://badge.fury.io/bo/angular-balance-text)
## Demo
[Simple demo](https://rawgit.com/JohnnyTheTank/angular-balance-text/master/demo/index.html)
## Installation
1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
1. via bower: `bower install --save angular-balance-text`
2. via npm: `npm install --save angular-balance-text`
3. via [downloaded files](https://github.com/JohnnyTheTank/angular-balance-text/zipball/master)
2. Add `jtt_balance_text` to your application's module dependencies.
3. Include dependencies and angular-balance-text in your HTML.
1. When using bower
```html
```
2. When using npm
```html
```
3. When using downloaded files
```html
```
## Usage
### Event
Angular event to manually re-balance all triggered elements use `angular-balance-text.refresh`
```javascript
//dispatches the event upwards through the scope hierarchy
$scope.$emit('angular-balance-text.refresh');
//dispatches the event downwards to all child scopes
$scope.$broadcast('angular-balance-text.refresh');
```
### Documentation
**Read the docs of jQuery balance-text [jQuery balance-text](https://github.com/adobe-webplatform/balance-text)**
## License
MIT