Simple AngularJS Read More Directive
npm install angular-read-morebash
$ bower install angular-read-more --save-dev
`Note that angular-sanitize is required since this directive is allowing HTML tags to be used in text.
Run example locally
`bash
$ git clone
$ npm install
$ bower install
$ gulp watch
`Test locally
`bash
$ git clone
$ npm install
$ bower install
$ gulp karma
`How to use in HTML
Include JS script
`html
`Add the module to your app,
`html
angular.module("app", ["hm.readmore"]);
`As element
`html
hm-text="{{ text }}"
hm-limit="100"
hm-more-text="read more"
hm-less-text="read less"
hm-dots-class="dots"
hm-link-class="links">
`As attribute
`html
hm-text="{{ text }}"
hm-limit="100"
hm-more-text="read more"
hm-less-text="read less"
hm-dots-class="dots"
hm-link-class="links">
*
hm-text - full text
* hm-limit - number > 0 of maximum characters before adding "..." and the more/less text. Default: unlimited
* hm-more-text - link text for read more. Default: Read more
* hm-less-text - link text for read less. Default: Read less
* hm-dots-class - css class for dots
* hm-link-class - css class for links of read more/read less textLicense
angular-read-more is licensed under the MIT license.Release new Github and Bower version
`bash
gulp bump
gulp build
git add .
git commit -m ""
git push
`
Use Github UI to create new tag and releaseRegister bower package for the first time
`bash
bower register angular-read-more git://github.com/ismarslomic/angular-read-more.git
``