Introduction |
|
xxv | |
|
Chapter 1 Building A Simple Angularjs Application |
|
|
1 | (56) |
|
|
1 | (2) |
|
|
3 | (1) |
|
Step 1 Scaffolding Your Project with Yeoman |
|
|
4 | (5) |
|
|
4 | (1) |
|
|
5 | (1) |
|
Exploring the Application |
|
|
6 | (2) |
|
|
8 | (1) |
|
Step 2 Creating Watchlists |
|
|
9 | (10) |
|
|
9 | (1) |
|
Installing Module Dependencies |
|
|
10 | (1) |
|
Bootstrapping the Application |
|
|
11 | (1) |
|
|
11 | (2) |
|
The Watchlist-Panel Directive |
|
|
13 | (3) |
|
|
16 | (2) |
|
|
18 | (1) |
|
Step 3 Configuring Client-Side Routing |
|
|
19 | (4) |
|
The Angular ngRoute Module |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
22 | (1) |
|
Step 4 Creating a Navigation Bar |
|
|
23 | (3) |
|
|
23 | (2) |
|
|
25 | (1) |
|
|
26 | (6) |
|
Creating the CompanyService |
|
|
27 | (1) |
|
Creating the AddStock Modal |
|
|
27 | (2) |
|
Updating the WatchlistService |
|
|
29 | (1) |
|
Implementing WatchlistCtrl |
|
|
30 | (1) |
|
Modifying the Watchlist View |
|
|
31 | (1) |
|
Step 6 Integrating with Yahoo Finance |
|
|
32 | (4) |
|
Creating the QuoteService |
|
|
33 | (2) |
|
Invoking Services from the Console |
|
|
35 | (1) |
|
Step 7 Creating the Stock Table |
|
|
36 | (4) |
|
Creating the StkStockTable Directive |
|
|
36 | (1) |
|
Creating the StkStockRow Directive |
|
|
37 | (2) |
|
Creating the Stock Table Template |
|
|
39 | (1) |
|
Updating the Watchlist View |
|
|
40 | (1) |
|
Step 8 Inline Form Editing |
|
|
40 | (4) |
|
Creating the Contenteditable Directive |
|
|
41 | (2) |
|
Updating the StkStockTable Template |
|
|
43 | (1) |
|
Step 9 Formatting Currency |
|
|
44 | (2) |
|
Creating the StkSignColor Directive |
|
|
44 | (1) |
|
Updating the StockTable Template |
|
|
44 | (2) |
|
Step 10 Animating Price Changes |
|
|
46 | (3) |
|
Creating the StkSignFade Directive |
|
|
46 | (2) |
|
Updating the StockTable Template |
|
|
48 | (1) |
|
Step 11 Creating the Dashboard |
|
|
49 | (8) |
|
Updating the Dashboard Controller |
|
|
49 | (3) |
|
Updating the Dashboard View |
|
|
52 | (1) |
|
|
53 | (2) |
|
|
55 | (2) |
|
Chapter 2 Intelligent Workflow And Build Tools |
|
|
57 | (38) |
|
What Can Tooling Do for Me? |
|
|
57 | (1) |
|
|
58 | (2) |
|
Getting Started with Bower |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (13) |
|
Getting Started with Grunt |
|
|
60 | (2) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
Configuring Tasks and Targets |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (1) |
|
|
66 | (2) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
69 | (4) |
|
|
73 | (11) |
|
Getting Started with Gulp |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
75 | (2) |
|
|
77 | (1) |
|
|
77 | (1) |
|
|
78 | (1) |
|
Arguments and Asynchronous Behavior |
|
|
79 | (3) |
|
|
82 | (1) |
|
|
82 | (2) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
84 | (10) |
|
Getting Started with Yeoman |
|
|
85 | (1) |
|
Scaffolding a New Project |
|
|
85 | (1) |
|
Exploring Plug-Ins and Tasks |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (1) |
|
|
91 | (1) |
|
|
91 | (1) |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (1) |
|
|
93 | (1) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (36) |
|
Why Is Architecture Important? |
|
|
95 | (1) |
|
Controllers, Services, and Directives |
|
|
96 | (13) |
|
|
96 | (2) |
|
|
98 | (1) |
|
|
99 | (3) |
|
The ModelService Paradigm |
|
|
102 | (2) |
|
|
104 | (1) |
|
Services Depending on Other Services |
|
|
104 | (1) |
|
|
105 | (2) |
|
|
107 | (1) |
|
Exposing API Using Controllers |
|
|
108 | (1) |
|
|
109 | (1) |
|
Organizing Your Code with Modules |
|
|
109 | (4) |
|
|
113 | (6) |
|
|
114 | (1) |
|
|
115 | (2) |
|
|
117 | (2) |
|
|
119 | (8) |
|
|
119 | (3) |
|
|
122 | (5) |
|
Best Practices for Structuring User Authentication |
|
|
127 | (2) |
|
Services: Loading from and Storing Data to the Server |
|
|
127 | (1) |
|
Controllers: Exposing an API to HTML |
|
|
128 | (1) |
|
Directives: Interfacing with the DOM |
|
|
128 | (1) |
|
|
129 | (2) |
|
|
131 | (26) |
|
|
131 | (3) |
|
What Data Binding Can Do for You |
|
|
134 | (2) |
|
Scoping Out AngularJS Scopes |
|
|
136 | (19) |
|
|
137 | (3) |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
141 | (1) |
|
Performance Considerations |
|
|
142 | (1) |
|
|
143 | (2) |
|
Filters and Data-Binding Gotchas |
|
|
145 | (1) |
|
Use Case 1 Rules for Converting Objects to Strings |
|
|
146 | (4) |
|
Use Case 2 Wrappers for Global Functions |
|
|
150 | (2) |
|
Use Case 3 Manipulating Arrays |
|
|
152 | (3) |
|
|
155 | (2) |
|
|
157 | (28) |
|
|
157 | (10) |
|
|
158 | (1) |
|
An 80/20 Understanding of Directives |
|
|
159 | (1) |
|
Writing Your Own Render-Only Directive |
|
|
160 | (2) |
|
Writing Your Own Event Handler Directive |
|
|
162 | (3) |
|
Writing Your Own Two-Way Directive |
|
|
165 | (2) |
|
Beyond the Simple Design Patterns |
|
|
167 | (1) |
|
A Deeper Understanding of Directives |
|
|
167 | (12) |
|
Directive Composition Using Templates |
|
|
167 | (2) |
|
Creating Separate Scopes for Directives |
|
|
169 | (1) |
|
The First Way of Using the scope Setting |
|
|
170 | (1) |
|
The Second Way of Using the scope Setting |
|
|
171 | (5) |
|
The restrict and replace Settings |
|
|
176 | (3) |
|
|
179 | (1) |
|
Changing Directive Templates at Runtime |
|
|
179 | (5) |
|
|
179 | (1) |
|
Using the transclude: true Setting |
|
|
179 | (3) |
|
Using the transclude: `element' Setting |
|
|
182 | (1) |
|
The compile Setting, or compile Versus link |
|
|
183 | (1) |
|
|
184 | (1) |
|
Chapter 6 Templates, Location, And Routing |
|
|
185 | (32) |
|
|
187 | (9) |
|
Templating with ngInclude |
|
|
188 | (3) |
|
ngInclude and Performance |
|
|
191 | (1) |
|
Including Templates with script Tags |
|
|
191 | (2) |
|
The $templateCache Service |
|
|
193 | (1) |
|
Next Steps: Templates and Data Binding |
|
|
194 | (2) |
|
Part II The $location Service |
|
|
196 | (4) |
|
|
196 | (1) |
|
|
197 | (1) |
|
Tracking Page State with $location |
|
|
198 | (2) |
|
Next Steps: Routing and SPAs |
|
|
200 | (1) |
|
|
200 | (15) |
|
|
202 | (1) |
|
The $routeProvider Provider |
|
|
203 | (2) |
|
|
205 | (1) |
|
|
205 | (2) |
|
|
207 | (1) |
|
Setting Up Prerender on the Server |
|
|
207 | (2) |
|
The Google AJAX Crawling Spec |
|
|
209 | (1) |
|
Configuring AngularJS for Search Engines |
|
|
210 | (1) |
|
Search Engine Integration in Action |
|
|
210 | (1) |
|
Introduction to Animations |
|
|
211 | (2) |
|
The ngAnimate Module in Action |
|
|
213 | (2) |
|
|
215 | (2) |
|
Chapter 7 Services, Factories, And Providers |
|
|
217 | (26) |
|
A Brief Overview of Dependency Injection |
|
|
218 | (3) |
|
|
219 | (1) |
|
|
220 | (1) |
|
Building Your Own Services |
|
|
221 | (11) |
|
|
222 | (2) |
|
|
224 | (4) |
|
|
228 | (4) |
|
Common Use Cases for Services |
|
|
232 | (4) |
|
|
233 | (1) |
|
Building the $stockPrices Service |
|
|
234 | (2) |
|
Utilizing Built-In Providers |
|
|
236 | (5) |
|
Custom Interpolation Delimiters |
|
|
236 | (1) |
|
Whitelisting Links with $compileProvider |
|
|
237 | (3) |
|
Global Expression Properties with $rootScopeProvider |
|
|
240 | (1) |
|
|
241 | (2) |
|
Chapter 8 Server Communication |
|
|
243 | (34) |
|
|
243 | (1) |
|
|
244 | (2) |
|
Services for HTTP Requests |
|
|
246 | (16) |
|
|
247 | (1) |
|
Setting the HTTP Request Body |
|
|
248 | (1) |
|
JSONP and Cross Site Scripting (XSS) |
|
|
249 | (1) |
|
HTTP Configuration Objects |
|
|
249 | (1) |
|
Setting Default HTTP Headers |
|
|
250 | (1) |
|
|
251 | (8) |
|
|
259 | (3) |
|
Consuming the Twitter REST API |
|
|
262 | (2) |
|
Scaffolding a REST API with StrongLoop LoopBack |
|
|
264 | (6) |
|
Building a Simple API Using LoopBack |
|
|
265 | (1) |
|
Creating a New Application |
|
|
265 | (1) |
|
Creating a LoopBack Model |
|
|
266 | (1) |
|
|
266 | (1) |
|
Generating Resources with Loopback AngularJS SDK |
|
|
267 | (3) |
|
Using Web Sockets with AngularJS |
|
|
270 | (3) |
|
Using Firebase with AngularJS |
|
|
273 | (2) |
|
|
275 | (2) |
|
Chapter 9 Testing And Debugging Angularjs Applications |
|
|
277 | (38) |
|
AngularJS Testing Philosophy |
|
|
277 | (4) |
|
|
279 | (2) |
|
Unit Testing in AngularJS |
|
|
281 | (11) |
|
The Mocha Testing Framework |
|
|
281 | (4) |
|
Unit Testing in the Browser with Karma |
|
|
285 | (3) |
|
Browser Testing in the Cloud with Sauce |
|
|
288 | (4) |
|
Evaluating the Unit Testing Options |
|
|
292 | (1) |
|
|
292 | (17) |
|
|
293 | (4) |
|
The Page You'll Be Testing |
|
|
297 | (1) |
|
DOM Integration Tests with ng-scenario |
|
|
298 | (6) |
|
DOM Integration Testing with Protractor |
|
|
304 | (5) |
|
Evaluating ng-scenario and Protractor |
|
|
309 | (1) |
|
|
309 | (5) |
|
|
309 | (2) |
|
Debugging Using Chrome DevTools |
|
|
311 | (1) |
|
Launching Developer Tools |
|
|
312 | (1) |
|
Inspecting the State of the DOM |
|
|
312 | (1) |
|
|
312 | (1) |
|
Setting Breakpoints in the Sources Tab |
|
|
313 | (1) |
|
Debugging Network Performance |
|
|
314 | (1) |
|
|
314 | (1) |
|
|
315 | (30) |
|
Using Angular-UI Bootstrap |
|
|
316 | (9) |
|
|
316 | (4) |
|
|
320 | (1) |
|
|
321 | (1) |
|
|
321 | (4) |
|
Hybrid Mobile Apps with the Ionic Framework |
|
|
325 | (6) |
|
Setting Up Ionic, Cordova, and the Android SDK |
|
|
326 | (1) |
|
Using AngularJS in Your Ionic App |
|
|
327 | (2) |
|
Yeoman Workflow and Building for Production |
|
|
329 | (1) |
|
Icons, Splash Screens, and Cordova Hooks |
|
|
330 | (1) |
|
Integrating Open Source JavaScript with AngularJS |
|
|
331 | (10) |
|
Dates and Time Zones with Moment |
|
|
331 | (4) |
|
Schema Validation and Deep Objects with Mongoose |
|
|
335 | (6) |
|
AngularJS and ECMAScript 6 |
|
|
341 | (2) |
|
Using yield for Asynchronous Calls |
|
|
342 | (1) |
|
|
343 | (2) |
Appendix: Resources |
|
345 | (2) |
Index |
|
347 | |