Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 1.01 KB

README.md

File metadata and controls

64 lines (48 loc) · 1.01 KB

ng-lorem

Angular Lorem Ipsum Generator

Installation

Using Bower:

bower install ng-lorem

How to use it

You should already have script required for Angular.

<script type="text/javascript" src="angular.min.js"></script>

You should add after:

<script type="text/javascript" src="ng-lorem.min.js"></script>

Then, inject ngLorem in your application module:

angular.module('myApp', ['ngLorem']);

Finally, add the directive lorem-ipsum in your view/s:

<lorem-ipsum></lorem-ipsum>

Attributes

  • repeat: number of paragraphs
<lorem-ipsum repeat="2"></lorem-ipsum>
  • words: number of words
<lorem-ipsum words="5"></lorem-ipsum>
  • chars: number of chars
<lorem-ipsum chars="20"></lorem-ipsum>
  • reverse: reverse paragraph
<lorem-ipsum reverse="true"></lorem-ipsum>
  • Also you can add characters at the end, adding them between tags
<lorem-ipsum>...</lorem-ipsum>