<!DOCTYPE html>
        <html>
          <head>
                  <title>Wikitechy AngularJS Tutorials</title>
                  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script>
          </head>
          <body>
                  <div ng-app="myApp" ng-controller="DOMCtrl">                    
                    <h3>HTML DOM in AngularJS</h3>
                    Enter Name :
                    <input type="text" ng-model="name" ng-hide="myhide"
                    ng-show="myshow"  ng-disabled="mydisabled" /
>

                    

                    <p>myhide : {{myhide}}</p>
                    <p>myshow : {{myshow}}</p>
                    <p>mydisabled : {{mydisabled}}</p>
                    <input type="button" value="Show" ng-click="showFun()" />
                    <input type="button" value="Hide" ng-click="hideFun()" />
                    <input type="button" value="Disable" ng-click="disFun()"/>
                  </div>
                  <script>
                    var app = angular.module("myApp", []);
                    app.controller("DOMCtrl", function($scope) {                    
                    $scope.showFun = function () {
                              $scope.myhide = false;
                              $scope.myshow = true;
                              $scope.mydisabled = false; };
                            $scope.hideFun = function () {
                              $scope.myhide = true;
                              $scope.myshow = false;
                              $scope.mydisabled = false; };
                            $scope.disFun = function () {
                              $scope.myhide = false;
                              $scope.myshow = true;
                              $scope.mydisabled = true; };
              });
                  
</script>         
          </body>
        </html>



 


www.wikitechy.com © Copyright 2016. All Rights Reserved.