Muutke küpsiste eelistusi

E-raamat: Professional AngularJS [Wiley Online]

  • Formaat: 408 pages
  • Ilmumisaeg: 19-Jun-2015
  • Kirjastus: Wrox Press
  • ISBN-10: 1119209544
  • ISBN-13: 9781119209546
Teised raamatud teemal:
  • Wiley Online
  • Hind: 47,58 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Formaat: 408 pages
  • Ilmumisaeg: 19-Jun-2015
  • Kirjastus: Wrox Press
  • ISBN-10: 1119209544
  • ISBN-13: 9781119209546
Teised raamatud teemal:
A comprehensive guide to AngularJS, Google's open-source client-side framework for app development Most of the existing guides to AngularJS struggle to provide simple and understandable explanations for more advanced concepts.

A comprehensive guide to AngularJS, Google's open-source client-side framework for app development.

Most of the existing guides to AngularJS struggle to provide simple and understandable explanations for more advanced concepts. As a result, some developers who understand all the basic concepts of AngularJS struggle when it comes to building more complex real-world applications. Professional AngularJS provides a thorough understanding of AngularJS, covering everything from basic concepts, such as directives and data binding, to more advanced concepts like transclusion, build systems, and automated integration testing. In addition to explaining the features of AngularJS, this book distills real-world experience on how these features fit together to enable teams to work together more effectively in building extraordinary apps.

  • Offers a more thorough and comprehensive approach to AngularJS
  • Includes pointers to other advanced topics
  • Lets you build a simple application from scratch, explaining basic building blocks along the way for quick hands-on learning
Introduction xxv
Chapter 1 Building A Simple Angularjs Application
1(56)
What You Are Building
1(2)
What You Will Learn
3(1)
Step 1 Scaffolding Your Project with Yeoman
4(5)
Installing Yeoman
4(1)
Scaffolding Your Project
5(1)
Exploring the Application
6(2)
Cleaning Up
8(1)
Step 2 Creating Watchlists
9(10)
The Application Module
9(1)
Installing Module Dependencies
10(1)
Bootstrapping the Application
11(1)
The Watchlist Service
11(2)
The Watchlist-Panel Directive
13(3)
Basic Form Validation
16(2)
Using the Directive
18(1)
Step 3 Configuring Client-Side Routing
19(4)
The Angular ngRoute Module
19(1)
Adding New Routes
20(1)
Using the Routes
21(1)
Template Views
22(1)
Step 4 Creating a Navigation Bar
23(3)
Updating the HTML
23(2)
Creating MainCtrl
25(1)
Step 5 Adding Stocks
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)
Production Deployment
53(2)
Conclusion
55(2)
Chapter 2 Intelligent Workflow And Build Tools
57(38)
What Can Tooling Do for Me?
57(1)
What Is Bower?
58(2)
Getting Started with Bower
58(1)
Searching for Packages
58(1)
Installing Packages
58(1)
Versioning Dependencies
59(1)
What Is Grunt?
60(13)
Getting Started with Grunt
60(2)
Installing Plug-Ins
62(1)
Directory Structure
62(1)
The Gruntfile
63(1)
Configuring Tasks and Targets
64(1)
The Connect Task
64(1)
The Less Task
65(1)
The JSHint Task
66(2)
The Watch Task
68(1)
The Default Task
69(1)
Creating a Custom Task
69(4)
What Is Gulp?
73(11)
Getting Started with Gulp
73(1)
Installing Plug-Ins
73(1)
The Gulpfile
73(1)
Creating Tasks
74(1)
The Connect Task
74(1)
The Less Task
75(2)
The JSHint Task
77(1)
The Watch Task
77(1)
The Default Task
78(1)
Arguments and Asynchronous Behavior
79(3)
Gulp, Grunt, and Make
82(1)
Automation Using Make
82(2)
When to Use Make
84(1)
When to Use Grunt
84(1)
When to Use Gulp
84(1)
What Is Yeoman?
84(10)
Getting Started with Yeoman
85(1)
Scaffolding a New Project
85(1)
Exploring Plug-Ins and Tasks
85(1)
load-grunt-tasks
86(1)
time-grunt
86(1)
grunt-newer
86(1)
grunt-contrib-watch
86(1)
grunt-contrib-connect
87(1)
grunt-contrib-jshint
87(1)
grunt-contrib-clean
87(1)
grunt-autoprefixer
87(1)
grunt-wiredep
88(1)
grunt-contrib-compass
88(1)
grunt-filerev
88(1)
grunt-usemin
88(1)
grunt-contrib-imagemin
89(1)
grunt-svgmin
89(1)
grunt-contrib-htmlmin
89(1)
grunt-ng-annotate
90(1)
grunt-google-cdn
90(1)
grunt-contrib-copy
90(1)
grunt-concurrent
90(1)
grunt-karma
91(1)
Alias Tasks and Workflow
91(1)
serve
91(1)
test
91(1)
build
92(1)
default
92(1)
Modifications
92(1)
Subgenerators
92(1)
Popular Generators
93(1)
angular-fullstack
93(1)
jhipster
93(1)
ionic
94(1)
Conclusion
94(1)
Chapter 3 Architecture
95(36)
Why Is Architecture Important?
95(1)
Controllers, Services, and Directives
96(13)
Controllers
96(2)
Scope Inheritance
98(1)
Event Transmission
99(3)
The ModelService Paradigm
102(2)
Services
104(1)
Services Depending on Other Services
104(1)
The event-emitter Module
105(2)
Directives
107(1)
Exposing API Using Controllers
108(1)
Conclusion
109(1)
Organizing Your Code with Modules
109(4)
Directory Structure
113(6)
Small Projects
114(1)
Medium Projects
115(2)
Large Projects
117(2)
Module Loaders
119(8)
RequireJS
119(3)
Browserify
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)
Conclusion
129(2)
Chapter 4 Data Binding
131(26)
What Is Data Binding?
131(3)
What Data Binding Can Do for You
134(2)
Scoping Out AngularJS Scopes
136(19)
Scope Inheritance
137(3)
$watch
140(1)
$apply
141(1)
$digest
141(1)
Performance Considerations
142(1)
An ngRepeat Gone Wrong
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)
Conclusion
155(2)
Chapter 5 Directives
157(28)
What Is a Directive?
157(10)
Understanding Directives
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)
Moving On
179(1)
Changing Directive Templates at Runtime
179(5)
Transclusion
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)
Conclusion
184(1)
Chapter 6 Templates, Location, And Routing
185(32)
Part I Templates
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)
What's in a URL?
196(1)
Introducing $location
197(1)
Tracking Page State with $location
198(2)
Next Steps: Routing and SPAs
200(1)
Part III Routing
200(15)
Using the ngRoute Module
202(1)
The $routeProvider Provider
203(2)
The $routeParams Service
205(1)
Navigation in Your SPA
205(2)
Search Engines and SPAs
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)
Conclusion
215(2)
Chapter 7 Services, Factories, And Providers
217(26)
A Brief Overview of Dependency Injection
218(3)
The $injector Service
219(1)
Function Annotations
220(1)
Building Your Own Services
221(11)
The factory() Function
222(2)
The service() Function
224(4)
The provider() Function
228(4)
Common Use Cases for Services
232(4)
Building a $user Service
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)
Conclusion
241(2)
Chapter 8 Server Communication
243(34)
Why Will I Learn?
243(1)
Introduction to Promises
244(2)
Services for HTTP Requests
246(16)
$http
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)
Using HTTP Interceptors
251(8)
The $resource Service
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)
The API Explorer
266(1)
Generating Resources with Loopback AngularJS SDK
267(3)
Using Web Sockets with AngularJS
270(3)
Using Firebase with AngularJS
273(2)
Conclusion
275(2)
Chapter 9 Testing And Debugging Angularjs Applications
277(38)
AngularJS Testing Philosophy
277(4)
The Testing Pyramid
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)
DOM Integration Tests
292(17)
A Guide to $httpBackend
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)
Debugging AngularJS Apps
309(5)
The debug Module
309(2)
Debugging Using Chrome DevTools
311(1)
Launching Developer Tools
312(1)
Inspecting the State of the DOM
312(1)
Using the Console Tab
312(1)
Setting Breakpoints in the Sources Tab
313(1)
Debugging Network Performance
314(1)
Conclusion
314(1)
Chapter 10 Moving On
315(30)
Using Angular-UI Bootstrap
316(9)
Modals
316(4)
Datepicker
320(1)
Timepicker
321(1)
Custom Templates
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)
Conclusion
343(2)
Appendix: Resources 345(2)
Index 347
About the authors

Valeri Karpov is a NodeJS Engineer for MongoDB and maintains numerous MongoDB-related open-source JavaScript modules. He's been developing AngularJS applications since 2010, including MongoDB's internal continuous integration framework and BookaLokal's mobile site.

Diego Netto is a software consultant and open source evangelist. Founder of an independent consultancy agency, Diego helps startups and enterprise companies leverage the power of open source technologies to deliver intuitive products.

Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world.