Angularjs Show Hide Password in Password TextBox with CheckBox

Angularjs Show Hide Password in Password TextBox with CheckBox

Angularjs Show Hide Password in Password TextBox with CheckBox

In this Post We Will Explain About is Angularjs Show Hide Password in Password TextBox with CheckBox With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to Create a Show Password Button in angular Example

In this post we will show you Best way to implement AngularJS – Show hide password in Password textbox using checkbox, hear for AngularJS CheckBox: Show Hide (Toggle) HTML DIV on CheckBox with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  React Folder Structure Best Practices

How To: Create a form show/hide password system in 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.

External Include file

AngularJS is a simple JavaScript framework Include one type of the (library) based on a very user friedly popular software mvc based architecture menas called the MVC.

Read Also:  Angular 6 CSS Tutorial with Examples

   <script src=""></script>


The Angular simple directives and the User’s view HTML DOM in a web-application page form the HTML view. In our example(, the simple HTML view comprises the HTML All the element, and then simple two angular directives Like as a namely angular ng-app as well as agular ng-controller

<section ng-app="liveApp" ng-controller="liveCtrl">
  <input type="{{customInType}}" placeholder="Live Put your password" />
  <input type="checkbox" id="checkbox" ng-model="checkboxPass" ng-click="simpleshowandhidepassword()" />
  <label for="checkbox" ng-if="checkboxPass">Hide password</label>
  <label for="checkbox" ng-if="!checkboxPass">Show password</label>  


The simple angular controller works as a all the data of the mediator between HTML views and models.

var liveApp = angular.module('liveApp', []);
liveApp.controller('liveCtrl', ['$scope', function( $scope ){
  // Set the default value of customInType
  $scope.customInType = 'password';
  // Hide and show password function
  $scope.simpleshowandhidepassword = function(){
    if ($scope.customInType == 'password')
      $scope.customInType = 'text';
      $scope.customInType = 'password';


 * Thanks to for the Example.
* {
    font-family: Verdana, monospace;

section {
  background: #fff;
  box-shadow: 3px 3px 0 1px rgba(0, 0, 0, .1);
  margin: 3em auto;
  padding: 2em;
  width: 800px;
input {
  font-size: 2em;
  padding: 2em;

Show Hide Password

Read Also:  Show-Hide Password in TextBox with Button using jQuery

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


I hope you have Got What is AngularJS CheckBox: Show Hide (Toggle) HTML DIV on CheckBox And how it works.I would Like to have FeedBack From My Blog( readers.Your Valuable FeedBack,Any Question,or any Comments about This Article( Are Most Always Welcome.

About Pakainfo

I am Jaydeep Gondaliya, a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Pakainfo →

Leave a Reply

Your email address will not be published. Required fields are marked *