Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 668 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 668 Bytes

angular-random-string

Angular service that generates a random alphanumeric string certain length.

install

	$ bower install --save angular-random-string 

##usage

  1. Load script
	<script src="/path/to/angular-random-string.js"></script>
  1. Add to your module
	var app = angular.module('MyApp', ['angularRandomString']);
  1. Inject to controller/service/etc.
	app.controller('myController', function(randomString){
		var str = randomString(); // -> random alphanumeric string 10 char length
		var str32 = randomString(32); // -> random alphanumeric string 32 char length
	});