


Angular addition, deletion, modification, checking and verification
This article mainly introduces the addition, deletion, modification, checking and verification of angular. Interested friends can refer to it.
The code is as follows:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>增删改查</title> <script src="js/angular.min.js"></script> <script> var app = angular.module("anan", []); app.controller("enen", function($scope) { $scope.user = [{ ck:false, id: 1, name: '李1', pwd: 123456, level: 3 }, { ck:false, id: 2, name: '李2', pwd: 123456, level: 1 }, { ck:false, id: 3, name: '李3', pwd: 123456, level: 3 }, { ck:false, id: 4, name: '李4', pwd: 123456, level: 1 }, { ck:false, id: 5, name: '李5', pwd: 123456, level: 2 }, {ck:false, id: 6, name: '李6', pwd: 123456, level: 3 }, { ck:false, id: 7, name: '李7', pwd: 123456, level: 2 }, { ck:false, id: 8, name: '李8', pwd: 123456, level: 1 }, { ck:false, id: 9, name: '李9', pwd: 123456, level: 2 }, { ck:false, id: 10, name: '李10', pwd: 123456, level: 1 }]; $scope.ckAll=function(){ for(var i=0;i<$scope.user.length;i++){ $scope.user[i].ck=$scope.flag; } } $scope.delso=function(){ var shu=0; for(var i=0;i<$scope.user.length;i++){ if($scope.user[i].ck){ $scope.user.splice(i,1); shu++; i--; } } } $scope.insert=function(m){ var good={ck:false,id:$scope.tid,name:$scope.tname,pwd:$scope.tpwd,level:$scope.tlevel}; $scope.user.push(good); } }) </script> <style type="text/css"> #cll:nth-child(even){ background-color: lightseagreen; } #cll:nth-child(odd){ background-color:#C9C994; } </style> </head> <body ng-app="anan" ng-controller="enen"> <div style="margin: 0 auto; height:800px; width: 1000px; border: 1px solid greenyellow; "> <input placeholder="用户名搜索" ng-model="souname"/> <select ng-model="jb"><option value="">选择级别</option ><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> 排序<select ng-model="px"><option>排序</option> <option value="id">id</option><option value="level">级别</option></select><br/> <button style=" background-color: #008000; margin: 6px; color: #FFFFFF;" ng-click="m=true">新增用户</button><button style="color: #FFFFFF; background-color: crimson;margin: 6px;" ng-click="delso()">批量删除</button> <div style="width: 1000px;border: 1px solid greenyellow;" ng-show="m"> id:<input type="number" ng-model="tid"/> 用户名:<input ng-model="tname"/> 密码:<input ng-model="tpwd"/> 级别:<input type="number" ng-model="tlevel"/> <button ng-click="insert(m=false)">添加</button> </div> <table style="width: 1000px;" border="1px"> <tr style="background-color: cadetblue;"> <td><input type="checkbox" ng-click="ckAll()" ng-model="flag"/></td> <td>id</td> <td>用户名</td> <td>密码</td> <td>级别</td> <td>操作</td> </tr> <tr id="cll" ng-repeat="e in user|orderBy:px:false|filter:{name:souname}|filter:{level:jb}"> <td><input type="checkbox" ng-model="e.ck"/></td> <td>{{e.id}}</td> <td>{{e.name}}</td> <td><span> {{e.pwd}}</span> <span ng-show="f"> <input ng-model="e.pwd" /> <button ng-click="f=false">保存</button> </span></td> <td>{{e.level}}</td> <td><button ng-click="f=true">修改密码</button></td> </tr> </table> </div> </body> </html>
Related recommendations:
How Angular performs services Side rendering development
Tips on using router in Angular4
Detailed explanation of multiple component data communication cases shared by angular4
The above is the detailed content of Angular addition, deletion, modification, checking and verification. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



We usually receive PDF files from the government or other agencies, some with digital signatures. After verifying the signature, we see the SignatureValid message and a green check mark. If the signature is not verified, the validity is unknown. Verifying signatures is important, let’s see how to do it in PDF. How to Verify Signatures in PDF Verifying signatures in PDF format makes it more trustworthy and the document more likely to be accepted. You can verify signatures in PDF documents in the following ways. Open the PDF in Adobe Reader Right-click the signature and select Show Signature Properties Click the Show Signer Certificate button Add the signature to the Trusted Certificates list from the Trust tab Click Verify Signature to complete the verification Let

1. After opening WeChat, click the search icon, enter WeChat team, and click the service below to enter. 2. After entering, click the self-service tool option in the lower left corner. 3. After clicking, in the options above, click the option of unblocking/appealing for auxiliary verification.

Angular.js is a freely accessible JavaScript platform for creating dynamic applications. It allows you to express various aspects of your application quickly and clearly by extending the syntax of HTML as a template language. Angular.js provides a range of tools to help you write, update and test your code. Additionally, it provides many features such as routing and form management. This guide will discuss how to install Angular on Ubuntu24. First, you need to install Node.js. Node.js is a JavaScript running environment based on the ChromeV8 engine that allows you to run JavaScript code on the server side. To be in Ub

With the rapid development of the Internet, front-end development technology is also constantly improving and iterating. PHP and Angular are two technologies widely used in front-end development. PHP is a server-side scripting language that can handle tasks such as processing forms, generating dynamic pages, and managing access permissions. Angular is a JavaScript framework that can be used to develop single-page applications and build componentized web applications. This article will introduce how to use PHP and Angular for front-end development, and how to combine them

In golang, Unicode encoding and rune type are required to verify whether the input is full-width characters. Unicode encoding is a character encoding standard that assigns a unique numeric code point to each character in the character set, which includes full-width characters and half-width characters. The rune type is the type used to represent Unicode characters in golang. The first step is to convert the input into a rune type slice. This can be converted by using golang's []rune type, e.g.

Indian Financial System Code is the abbreviation. Indian bank branches participating in the electronic funds transfer system are identified by a special 11-character code. The Reserve Bank of India uses this code in internet transactions to transfer funds between banks. IFSC code is divided into two parts. Banks are identified by the first four characters, while branches are identified by the last six characters. NEFT (National Electronic Funds Transfer), RTGS (Real Time Gross Settlement) and IMPS (Immediate Payment Service) are some of the electronic transactions that require IFSC codes. Method Some common ways to validate IFSC codes using regular expressions are: Check if the length is correct. Check the first four characters. Checkthefifthcharacter.Che

Golang is a high-performance, modern programming language that often involves string processing in daily development. Among them, validating whether the input is in uppercase letters is a common requirement. This article will introduce how to verify whether the input is uppercase letters in Golang. Method 1: Use the unicode package. The unicode package in Golang provides a series of functions to determine the encoding type of characters. For uppercase letters, the corresponding encoding range is 65-90 (decimal), so we can use unicod

PHP8 is the latest version of PHP, bringing more convenience and functionality to programmers. This version has a special focus on security and performance, and one of the noteworthy new features is the addition of verification and signing capabilities. In this article, we'll take a closer look at these new features and their uses. Verification and signing are very important security concepts in computer science. They are often used to ensure that the data transmitted is complete and authentic. Verification and signatures become even more important when dealing with online transactions and sensitive information because if someone is able to tamper with the data, it could potentially
