Skip to content

industrial-assets/angular-waffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

angular-waffle

The angular-waffle Bower component

The Waffle Generator is a popular method of creating quanta of gibberish that is unnervingly pleasant to read. Use this component to pad out your pages, (or dissertations), where you'd normally use that boring Lorum Ipsum rubbish.

For an example of what it produces, click here

This is an Angular port of Andrew Clarke's Waffle Generator, written without his permission but hopefully with his consent. I am his nephew after all... it's not like he can't invite me to family functions.

To install the component run:

$ bower install angular-waffle

You're then given a waffle service that exposes functions.

angular
  .module('angularWaffleApp', ['ngWaffle'])
  .controller('ExampleCtrl', function ($scope, $waffle) {

    $scope.title = $waffle.generateTitle();

    $scope.name = $waffle.generateName();

    $scope.waffle1 = $waffle.generateParagraph(2);

    $scope.waffle2 = $waffle.generateParagraph(3);

    $scope.waffle3 = $waffle.generateParagraph(5);

    $scope.waffle4 = $waffle.generateParagraph(1);

    $scope.items = $waffle.generateList(4);

    $scope.quote = $waffle.generateQuote(1);

});

generateTitle()

Does what it says. It makes a title and stores the name globally for the current instance of Waffle.

generateName()

Generates a human name. Surprisingly.

generateParagraph(num)

This is the good stuff. Waffle will return [num] lines of gibberish.

generateList(num)

If you would like an array of nonsense, specify the quantity of nonsense you would like.

generateQuote(num)

The resultant twaddle will be limited to the value you put in as [num]. It will also use the generated title of the page if there is one, and stick an Author's name on the end.

For an example project Click here

Or, for a demo Click here

About

The angular-waffle Bower component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published