通过Request.Form获取同name的checkbox所有值

转自:http://www.cnblogs.com/Fred_Xu/archive/2013/01/16/how-to-get-the-checkbox-value-from-a-dynamically-generated-checkbox-list-asp-net.html

前端页面需要有一个动态增加表格行的功能,引用了table.addrow.js这个jquery插件,每一行有一个checkbox,name统一为cbMaintainRatio,而鉴于这部分是一个纯Html Form的提交非用户控件,所以我们在后端使用Request.Form来获取值,但问题出来了:

 1 <table border="1" class="atable">
 2             <tbody><tr class="evenRow">
 3                 <th>
 4                     width(px)
 5                 </th>
 6                 <th>
 7                     height(px)
 8                 </th>
 9                 <th>maintain ratio</th>
10                 <th></th>
11             </tr>
12             <tr class="cloneRow9674 oddRow">
13                 <td>
14                     <input type="text" size="25" name="imgwidth">
15                 </td>
16                 <td>
17                     <input type="text" size="25" name="imgheight">
18                 </td>
19                 <td>
20                     <input type="checkbox" name="maintainratio">
21                 </td>
22                 <td class="btnCol">
23                     <input type="button" value="Remove" class="delRow delRow9674" style="display: inline-block;">
24                 </td>
25             </tr><tr class="cloneRow9674 evenRow">
26                 <td>
27                     <input type="text" size="25" name="imgwidth">
28                 </td>
29                 <td>
30                     <input type="text" size="25" name="imgheight">
31                 </td>
32                 <td>
33                     <input type="checkbox" name="maintainratio">
34                 </td>
35                 <td class="btnCol">
36                     <input type="button" value="Remove" class="delRow delRow9674" style="display: inline-block;">
37                 </td>
38             </tr><tr class="cloneRow9674 oddRow">
39                 <td>
40                     <input type="text" size="25" name="imgwidth">
41                 </td>
42                 <td>
43                     <input type="text" size="25" name="imgheight">
44                 </td>
45                 <td>
46                     <input type="checkbox" name="maintainratio">
47                 </td>
48                 <td class="btnCol">
49                     <input type="button" value="Remove" class="delRow delRow9674" style="display: inline-block;">
50                 </td>
51             </tr>
52             <tr class="evenRow">
53             <td colspan="4"><input type="button" value="Add" class="alternativeRow addRow9674"></td>
54             </tr>
55         </tbody></table>

如果我们有多行表单,也就是有多个name为cbMaintainRatio的checkbox,post到后端的form,我们通过Request.Form["cbMaintainRatio"]只能获取到一个值"on",而不是像<input type="text" name="width" />这种获取到的"100,200,"值。

浏览了一遍addrow插件的文档,他竟然不支持event,好吧...那只能我们自己来改造代码了:

页面增加一个hidden input,目的为保存多个checkbox的值,如果选中则设定为true,否则false,然后用,分割赋值给这个hidden input

 function setMaintainRatio() {

var fields;
$("input[name='cbMaintainRatio']").each(function () {
var txt = $("input[name='cbMaintainRatioList']");
fields = ($("input[name='cbMaintainRatio']").map(function () {
if (this.checked)
return "1";
else
return "0";
}).get().join(","));

$(txt).val(fields);
});

        }

提交Form的按钮绑定上面这个js 方法:

1  <asp:Button ID="btwImageCreate" runat="server" Text="Image Create" OnClick="btwImageCreate_Click" OnClientClick="setMaintainRatio(); return true" />
2         <input type="hidden" name="cbMaintainRatioList" /> 

OK,这样我们就可以在后台代码通过Request.Form的形式获取到每一行这个name="cbMaintainRatio" checkbox的值了!

 

全部和已选择比较 

 1  for (int i = 0; i < Model[0].Count; i++)
 2                     {
 3                         bool c = false;
 4                         for (int j = 0; j < Model[1].Count; j++)
 5                         {
 6                             if (Model[1][j].ButtonID == Model[0][i].ButtonID)
 7                             {
 8                                 c = true;
 9                                 break;
10                             }
11 
12                         }
13                         if (c)
14                         {
15                             <div class="check-box">
16 
17                                 <input name="btns" id="Model[0][i].ButtonID" checked="checked" class="input-text" type="checkbox" style="width: 100px" autocomplete="off" />
18 
19                                 <lable>Model[0][i].Name</lable>
20                             </div>
21                         }
22                         else
23                         {
24                             <div class="check-box">
25 
26                                 <input name="btns" id="Model[0][i].ButtonID" class="input-text" type="checkbox" style="width: 100px" autocomplete="off" />
27 
28                                 <lable>Model[0][i].Name</lable>
29                             </div>
30                         }
31 
32                     }

 

转载于:https://www.cnblogs.com/zhutiehan/p/5648783.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
非常不错的书 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Tips, Notes, and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Supplementary Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Want to Take Your Learning Further? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx Chapter 1 Falling In Love With AngularJS . . . . . 1 The Power Features of AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Download and Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installing via CDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Hosting on Your Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Required Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 AngularJS Batarang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 The Angular Seed Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 The Anatomy of an AngularJS app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 What is MVW? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Structuring Our Code With MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Unit and End-to-End Testing in AngularJS . . . . . . . . . . . . . . . . . . . . . . . . 17 Where to Put Your Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 How to Run Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 When Not To Use AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 2 Modules, Controllers & Data Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Creating Our First Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Modular Programming Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 The Role of a Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Attaching Properties and Functions to Scope . . . . . . . . . . . . . . . . . . 30 Adding Logic to the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Adding Instance Functions and Properties to Controllers . . . . . . . . 35 Dependency Injection in Controllers With Minification . . . . . . . . . 37 Overview of Two-Way Data Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 What Is Data Binding? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Two-Way Binding in AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Doing Something Cool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Introducing Our Demo Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 The Single Page Blogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Getting Ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Chapter 3 AngularJS Scope & Events . . . . . . . . . . . . 45 Scope Demystified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Writing Access with Prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Objects Can Extend Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Prototypal Inheritance in AngularJS Scopes . . . . . . . . . . . . . . . . . . . . . . . 49 Advanced Scope Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 The Watchers in AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 The $watchCollection() Function . . . . . . . . . . . . . . . . . . . . . . . 56 The $apply() Function and the $digest Loop . . . . . . . . . . . . . . 57 $apply and $digest in Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 x Broadcasting & Emitting Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 $scope.$emit(name,args) For Emitting Events . . . . . . . . . . . . 64 $scope.$broadcast(name,args) For Broadcasting Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 $scope.$on(name,handlerFunction) For Registering Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Events in Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 The $destroy event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Chapter 4 Multiple Views and Routing . . . . . . . . . 71 Creating Multiple Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Using $routeParams in the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Using ng-template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 The resolve Property in the Route Config Object . . . . . . . . . . . . . . . . . 83 Exploring the $location Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 The API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Events in Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 $location related events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 $route related events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 The ng-include Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Introducing the Angular UI Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Getting Started With UI Routter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Defining States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Chapter 5 AngularJS Services, Factories, and Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 xi Eager Loading of a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Using Decorators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Chapter 6 Developing Single Page Blogger . . . 113 Developing Our App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Defining Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Creating Our Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Creating the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Creating the Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 App Entry Point (index.html) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 How About Some Unit Tests? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Unit Testing postService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Unit Testing Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Writing an End-to-End (e2e) Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Chapter 7 Understanding AngularJS Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 AngularJS Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 <input> and <textarea> controls . . . . . . . . . . . . . . . . . . . . . . . 130 <select> control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Radio Button Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Checkbox Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 AngularJS Form Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 xii Applying Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Updating Models With a Twist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Forms in Action : Single Page Blogger v1.1 . . . . . . . . . . . . . . . . . . . . . . . 143 Creating the admin Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Defining States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Creating Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Admin Panel Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Template For Adding a New Post . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Chapter 8 Interacting with REST APIs . . . . . . . . . 151 A Primer on Promises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 The Promise API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Example Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Promise Chaining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Creating a Promise that Always Rejects . . . . . . . . . . . . . . . . . . . . . 159 Understanding the $http Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 The config Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 A Weather Search Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Setting Request Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Request and Response Transformers . . . . . . . . . . . . . . . . . . . . . . . . 166 Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Interceptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Understanding AngularJS $resource . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 How Does $resource Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 xiii Chapter 9 Using REST APIs in Single Page Blogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Applying $resource to Our App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Defining Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Defining Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Including angular-resource.js and Adding the ngResource Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Unit Testing Our Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Chapter 10 AngularJS Directives . . . . . . . . . . . . . . . . . . 193 What Are Directives, Really? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Directives From the jQuery Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Creating Custom Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 The Link Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 The Compile Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 Compilation of Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Changing a Directive’s Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Binding Between Parent Scope and Isolated Scope Models . . . . . . . . . 207 Using @ For One-Way Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Using = For Two-Way Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Using & to Execute Functions in the Parent Scope . . . . . . . . . . . . 209 Parent Scope vs. Child Scope vs. Isolated Scope . . . . . . . . . . . . . . . . . . . 212 Transclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Differences Between transclude:'element' and transclude:true . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 The Controller Function and Require . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Cleaning Up Your Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 IE 8 Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 xiv Chapter 11 Adding a Comment System to Single Page Blogger . . . . . . . . . . . . . . . . . . . . 219 Unit Testing Our Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Chapter 12 Dependency Injection In AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 A Brief Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 The $provide Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 The $injector Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Dynamically Injecting a Dependency . . . . . . . . . . . . . . . . . . . . . . . . 230 Registration of Controllers, Filters, and Directives . . . . . . . . . . . . . 230 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Chapter 13 AngularJS Filters . . . . . . . . . . . . . . . . . . . . . . . 233 Filter Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Fun with Custom Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Chaining Multiple Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Using Filters in Controllers, Services, and Directives . . . . . . . . . . . 236 Meet a Filter Called filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Meet the orderBy Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Meet the limitTo Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Using the $filter Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Using Filters in Single Page Blogger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Permalink Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Wordcount Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 xv Chapter 14 AngularJS Animation . . . . . . . . . . . . . . . . . 245 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Animation with CSS3 Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Going Further . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Animation Using Keyframes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Animation Using jQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Animation Using ngClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Animation with Custom Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Adding Simple Animation to Single Page Blogger . . . . . . . . . . . . . . . . . 257 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Chapter 15 Deployment and Internationalization . . . . . . . . . . . . . . . . . . . 259 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 Chapter 16 Authentication and Authorization in AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Adding Login Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Where To Go Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Things to Do Now . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Improving Our Demo App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Host it Yourself : Back-end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值