angular-no-widows

Angular directive to stop text wrapping a single word to a new line (widows)
Homepage:
1 person uses it
Submitted by: 294948?v=3 IamAdamJowett

No Widows for AngularJS

An AngularJS directive that ensures single words do not wrap onto a new line (widows).

What does No Widows do?

The angular-no-widows directive when placed on a text element will ensure at least two words wrap to a new line, avoiding single word wraps (called widows).

Installation

There are three easy ways to install the angular-no-widows directive:

Node

To install via npm, run:

Bower

To install via Bower, run:

Manual download

Download the no-widows.directive.js folder, and include it in your index.html file with something like:

Also be sure to include the module in your app.js file with:

Usage

To use the angular-no-widows directive, place the no-widows attribute onto a text element, such as a heading or paragraph e.g.

or

Licence

MIT, free to use in personal and commercial projects.

comments powered by Disqus
This page was last updated over 1 year ago.