AngularJS Random Strong Password Generator

AngularJS Random Strong Password Generator

AngularJS Random Strong Password Generator

In this Post We Will Explain About is AngularJS Random Strong Password Generator With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Strong Password Generator with Pure AngularJS Example

In this post we will show you Best way to implement Strong Password Generator Using AngularJS, hear for Random Strong Password Generate Using AngularJS with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Strong Password Generator with Pure AngularJS

In this Example,First of all Add or Include External Libs Like as a(jQuery, css etc..), and then create a simple index.php or index.html page.After that crate a simple javascript file like as a index.js or main.js, It is also add your web-application First Header Part to some priority set.After that Include your relevant CSS Class.

We will set Simple 4 option display in which it will strong generate password with
Uppercase Letter
Lowercase Letter
Symbol
Number

Include External Libs

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
<script src="myapp.js"></script>

index.html

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Pakainfo.com | Random Strong Password Generate Using AngularJS</title>
</head>
<body>
<!-- Devloped by Pakainfo.com free download examples -->
	<div class="container" data-ng-app="liveAppPass" data-ng-controller="passLiveCtrl">
		<h1 align="center">Strong Password Generator Using AngularJS</h1>
		<hr/>
		<!-- Devloped by Pakainfo.com free download examples -->
			<form role="form">
				<div class="input-group">
				<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
				<input type="text" data-ng-model="passwordInput" id="passwordInput" class="form-control" name="password" placeholder="Generate your own strong password">
				</div>
				<br/>
				<!-- Devloped by Pakainfo.com free download examples -->
				<div class="panel panel-primary">
					<div class="panel-body">
						<label class="checkbox-inline">
						<input type="checkbox" data-ng-model="GenrateUpLevel">Uppercase Letters
						</label>
						<label class="checkbox-inline">
						<input type="checkbox" data-ng-model="GenrateNo">Numbers
						</label>
						<label class="checkbox-inline">
						<input type="checkbox" data-ng-model="GenrateSbl">Special Characters (e.g. [email protected]#$)
						</label>
					</div>
				</div>
				<!-- Devloped by Pakainfo.com free download examples -->
				<div class="form-group">
				<label for="passwordInput">Password Length</label>
				<input type="range" min="5" max="30" step="1" value="15" data-ng-model="getPassLength">{{getPassLength}}
				</div>
				<button type="button" class="btn btn-success" data-ng-click="realPassGenrate()">Generate</button>
			</form>
	</div>
</body>
</html>

myapp.js

// myapp.js
var liveAppPass = angular.module('liveAppPass', ['ui.bootstrap']);
var controllers = {};
controllers.passLiveCtrl = function($scope) {
$scope.getPassLength = 15;
$scope.GenrateUpLevel = true;
$scope.GenrateNo = false;
$scope.GenrateSbl = false;
//-- Devloped by Pakainfo.com free download examples
	$scope.realPassGenrate = function() {
	
		var smallLater = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
		var extraspecChar = ['!', '"', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\', ']', '^', '_', '`', '{', '|', '}', '~'];
		var biglatters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
		var numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
		
		var liveoutChar = smallLater;
		if ($scope.GenrateUpLevel) {
			liveoutChar = liveoutChar.concat(biglatters);
		}
		if ($scope.GenrateNo) {
			liveoutChar = liveoutChar.concat(numbers);
		}
		if ($scope.GenrateSbl) {
			liveoutChar = liveoutChar.concat(extraspecChar);
		}
		var passwordArray = [];
		for (var i = 1; i < $scope.getPassLength; i++) {
			passwordArray.push(liveoutChar[Math.floor(Math.random() * liveoutChar.length)]);
		};
		$scope.passwordInput = passwordArray.join("");
	};
};
liveAppPass.controller(controllers);

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is Generate random password string with requirements in AngularJS And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.


Related FAQ

Here are some more FAQ related to this Article:

  1.   PHP Laravel Get Last Inserted ID in MySQL Table
  2.   Create React Nested Router component
  3.   Convert Javascript Arrays Comma separated values
  4.   Date Filter Using Angular Example with Demo
  5.   JavaScript Client side Password hashing and encryption
  6.   PHP get max value in array
  7.   ng-mouseover Event using Angular Example
  8.   Strong Random Password Generator Using Pure JavaScript
  9.   AngularJS Add ng class to toggle Active Menu
  10.   PHP download file from URL Curl