Learning Angular (2) - using ng-switch

Size
1,653 Kb
Views
38,456

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 Previews

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; } }
};
Learning Angular (2) - using ng-switch - Script Codes
Learning Angular (2) - using ng-switch - Script Codes
Home Page Home
Developer Hélio Marcondes
Username haykou
Uploaded November 09, 2022
Rating 3
Size 1,653 Kb
Views 38,456
Do you need developer help for Learning Angular (2) - using ng-switch?

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!

Hélio Marcondes (haykou) Script Codes
Create amazing sales emails with AI!

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!