Skip to content

angular directive for "show more/show less" thing on text elements

License

Notifications You must be signed in to change notification settings

vsubbotskyy/angular-text-collapse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

text-collapse

Contents

A directive that can easily be used on text areas/fields to automatically truncate/collapse/shrink text to a specific character limit, adding a "show more/less" toggle.

Usage

get bower package:

bower install vsubbotskyy/angular-text-collapse

add reference

<script src="bower_components/angular-text-collapse/text-collapse.js"></script>

add dependancy to the module

angular.module('app', ['textCollapse'])...

use text-collapse element with required data-text and data-max-length attributes

<text-collapse  data-max-length="500" 
                data-text="{{text}}"
                data-collapse-label="collapse"
                data-expand-label="expand">

About

angular directive for "show more/show less" thing on text elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%