Angular JS - Basic app
How do I make an angular js - basic app?
What is a angular js - basic app? How do you make a angular js - basic app? This script and codes were developed by Renaud Tertrais on 12 August 2022, Friday.
Angular JS - Basic app - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Angular JS - Basic app</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!DOCTYPE html>
<html ng-app>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular.min.js"></script>
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<meta charset=utf-8 />
<title>Angular JS Demo</title>
</head>
<body ng-controller="ctrl"> <h2>{{rows.length}} Friend{{plural(rows)}} <span ng-show="temp">?<small class="muted"><em > (only {{rows.length-1}} actually....)</em></small></span></h2> <form class="form-horizontal"> <span ng-class="{'input-append':addName}"> <input id="add" type="text" placeholder="Another one ?" ng-model="addName" ng-change="addTemp()"/> <input type="submit" class="btn btn-primary" ng-click="addRow()" ng-show="addName" value="+ add"/> </span> <span class="search input-prepend" ng-class="{'input-append':search}"> <span class="add-on"><i class="icon-search"></i></span> <input type="text" class="span2" placeholder="Search" ng-model="search"> <button type="submit" class="btn btn-inverse" ng-click="search=''" ng-show="search" value="+ add"><i class="icon-remove icon-white"></i></button>
</span> </form> <table class="table table-striped"> <tr ng-repeat="row in rows | filter : search" ng-class="{'muted':isTemp($index)}"> <td>{{$index+1}}</td> <td>{{row}}</td> <td> <button class="btn btn-danger btn-mini" ng-click="deleteRow(row)" ng-hide="isTemp($index)"><i class="icon-trash icon-white"></i></button> </td> </tr> </table>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Angular JS - Basic app - Script Codes CSS Codes
body{ padding:20px;
}
.search{ margin-left:10px;
}
Angular JS - Basic app - Script Codes JS Codes
function ctrl($scope){ $scope.rows = ['Paul','John','Lucie']; $scope.temp = false; $scope.addRow = function(){ $scope.temp = false; $scope.addName=""; }; $scope.deleteRow = function(row){ $scope.rows.splice($scope.rows.indexOf(row),1); }; $scope.plural = function (tab){ return tab.length > 1 ? 's': ''; }; $scope.addTemp = function(){ if($scope.temp) $scope.rows.pop(); else if($scope.addName) $scope.temp = true; if($scope.addName) $scope.rows.push($scope.addName); else $scope.temp = false; }; $scope.isTemp = function(i){ return i==$scope.rows.length-1 && $scope.temp; };
}
Developer | Renaud Tertrais |
Username | renaudtertrais |
Uploaded | August 12, 2022 |
Rating | 4.5 |
Size | 2,394 Kb |
Views | 36,432 |
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 |
React-draggable | 2,539 Kb |
Buttons wip... | 4,057 Kb |
Flat CSS3 Breadcrumb | 3,093 Kb |
React Flat Gradient | 5,268 Kb |
Animated logo SVG, CSS3 and JS | 3,432 Kb |
Flat CSS3 rating system | 2,752 Kb |
React-a11y-range | 7,029 Kb |
Playing with Mustache and Google Chart | 3,289 Kb |
TCP Brut Force | 4,629 Kb |
Pure CSS3 arrow icons | 4,030 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 |
Collapsing Widget | Er40 | 4,279 Kb |
Animated skewed panes | NyX | 4,462 Kb |
Minimelephant | Smashlee | 2,507 Kb |
React Template | Isac | 1,241 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
A Pen by Alexandru Pora | Axpro | 1,615 Kb |
BlueBox Fork | Huskynation | 12,675 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!