Learning Angular (2) - using ng-switch
How do I make an learning angular (2) - using ng-switch?
Just for learning how to use ng-switch and ng-show to call a function.. What is a learning angular (2) - using ng-switch? How do you make a learning angular (2) - using ng-switch? This script and codes were developed by Hélio Marcondes on 09 November 2022, Wednesday.
Learning Angular (2) - using ng-switch - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Learning Angular (2) - using ng-switch</title>
</head>
<body> <body ng-app ng-controller='controller'> <label>Type a value: <input type="text" ng-model="value" /></label><br /> <div ng-switch="value" ng-hide="condition()"> <div ng-switch-when="1">1</div> <div ng-switch-when="3">3</div> <div ng-switch-when="4">4</div> <div ng-switch-when="5">5</div> <div ng-switch-default>None</div> </div> <div ng-show="condition()">{{value2}}</div>
</body> <script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.24/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Learning Angular (2) - using ng-switch - Script Codes JS Codes
function controller($scope){ $scope.condition = function(){ if($scope.value>=10){ return $scope.value2=200; } }
};
Developer | Hélio Marcondes |
Username | haykou |
Uploaded | November 09, 2022 |
Rating | 3 |
Size | 1,653 Kb |
Views | 38,456 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Pure AngularJS Tabs | 2,067 Kb |
Side Menu using AngularJS | 1,988 Kb |
Multi step form | 5,689 Kb |
Skill Bar with Jquery | 2,470 Kb |
Simple Jquery Slider | 2,430 Kb |
Introduction to three.js | 1,916 Kb |
Sticky Header using Jquery | 2,024 Kb |
Flip CSS Animation with Logo | 1,797 Kb |
Simple Form with Icons | 2,071 Kb |
Bootstrap Menu with Effect | 2,121 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
RSW | JordanC | 3,726 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Dribbble Inspired Registration Form | Lancebush | 2,358 Kb |
Responsive Table-less Shopping Cart | Alex_rodrigues | 6,637 Kb |
Improved Page Flipping Effect | Usaphp | 5,201 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
A Pen by Patrick Cox | Pcridesagain | 2,899 Kb |
Save for later... | Victorfreire | 1,359 Kb |
Font stack | Adrianjacob | 1,868 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!