售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Ember.js Cookbook
Table of Contents
Ember.js Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Ember CLI Basics
Introduction
Installing Ember CLI
Getting ready
A one-click installer for Windows or Mac
Homebrew or MacPorts for Mac
A TAR file
The Linux package manager
Test installation
How to do it...
How it works...
There's more...
Commands
Aliases
Creating your first project
How to do it...
How it works...
There's more...
Exploring pods and the folder layout
Getting ready
Pods
How to do it...
How it works...
Asset compilation
How to do it...
CSS and assets
Minifying
Fingerprinting
How it works...
Dependency management
How to do it...
The app.import code
How it works...
Upgrading your project
How to do it...
Updating an existing project
How it works...
Deployment
How to do it...
Deploying to Firebase
How it works...
2. The Ember.Object Model
Introduction
Working with classes and instances
How to do it...
Accessing properties within the bulb instance
Initializing the Ember object
Reopening classes
How it works...
There's more...
Working with computed properties
How to do it...
Chaining the Light object
Alias
How it works...
Working with Ember observers in Ember.js
How to do it...
Synchronous issues with the Light object and observers
How it works...
Working with bindings
How to do it...
One-way binding
How it works...
Using mixins
How to do it...
Mixins with the Ember CLI
How it works...
Using enumerables with arrays
Getting ready
How to do it...
Using forEach with an array
Using map with an array
Using mapBy with an array
Finding the first and last objects in an array
Fun with filters
Using filterBy with a collection of objects
Using find to get the first match
Using findBy with collections
Learning with the every enumerable
Using any to find at least one match
How it works...
3. Ember Templates
Introduction
Defining an application template
Getting ready
How to do it...
Using templates with components
How it works...
Working with conditionals in templates
How to do it...
Using inline invocation with templates
Working on nested invocation with templates
The opposite of if is unless
How it works...
Displaying a list of items
How to do it...
Finding the index of the array
How it works...
Binding with element attributes and classes
How to do it...
How it works...
Working with HTML links inside templates
How to do it...
Using link-to helpers with dynamic segments
How it works...
Handling HTML actions
How to do it...
Adding a parameter to an action event
How it works...
Using template input helpers
How to do it...
How to use checkbox helpers
How to use text areas
How it works...
Using development helpers
How to do it...
How it works...
4. Ember Router
Introduction
Defining an application route
How to do it...
Working with nested routes in your application
Adding a wildcard
Adding dynamic segments to our about application
How it works...
Setting up a route model
How to do it...
How it works...
Handling dynamic segments inside routes
Getting ready
How to do it...
How it works...
Defining routes with templates
How to do it...
How it works...
Using redirection with routes
How to do it...
How it works...
Working with asynchronous routing
How to do it...
How it works...
Loading and error handling
How to do it...
Creating an error substate
How it works...
Using query parameters
How to do it...
Adding a link-to helper with a query parameter
Resetting a controller's query parameters
How it works...
5. Ember Controllers
Introduction
Storing application properties
How to do it...
How it works...
Handling actions in controllers
How to do it...
How it works...
Working with transitions
How to do it...
How it works...
Managing dependencies between controllers
How to do it...
How it works...
6. Ember Components
Introduction
Using components in an application
How to do it...
Creating a student component dynamically
How it works...
Using events in components
How to do it...
How it works...
Implementing actions in components
How to do it...
Closure actions with our student component
How it works...
Passing properties to a component
How to do it...
How it works...
Using yield with components
How to do it...
How it works...
7. Ember Models and Ember Data
Introduction
Understanding the functionalities of Ember Data
Getting ready
How to do it...
How it works...
Creating, reading, updating, and deleting records with Ember Data
Getting ready
How to do it...
How it works...
Using fixtures
Getting ready
How to do it...
How it works...
Customizing the adapter and serializer
Getting ready
How to do it...
Optional customizations in Ember Data
Host customization
Headers customization
Working with serializers
Updating IDs
KeyForAttribute when working a JSON payload
How it works...
Working with relationships
Getting ready
How to do it...
How it works...
8. Logging, Debugging, and Testing
Introduction
Using Ember.Logger
How to do it...
How it works...
Using Ember Inspector
Getting ready
How to do it...
Verifying deprecations and using advanced features of Ember Inspector
How to do it...
How it works...
Using acceptance testing
How to do it...
How it works...
Using unit tests
How to do it...
How it works...
Testing components
How to do it...
Testing actions in the font-sizer component
How it works...
Testing routes
How to do it...
How it works...
Testing models
How to do it...
How it works...
Testing controllers
How to do it...
How it works...
9. Real-Life Tasks with Ember.js
Introduction
Using services with a component
How to do it...
How it works...
Managing basic authentication
How to do it...
How it works...
Using OAuth2 with Ember Simple Auth
Getting ready
How to do it...
How it works...
Using Liquid Fire to create transitions
How to do it...
How it works...
Working with HTML5 drag and drop
How to do it...
How it works...
Learning Bootstrap with Ember.js
How to do it...
How it works...
10. Awesome Tasks with Ember
Introduction
Using Ember validations
How to do it...
How it works...
Using D3.js with Ember.js
How to do it...
How it works...
Using Ember with Sockets
How to do it...
How it works...
There's more...
Using Ember with Firebase
Getting ready
How to do it...
How it works...
Using server side rendering
How to do it...
How it works...
11. Real-Time Web Applications
Introduction
Using dependency injection
How to do it...
How it works...
Working with application initializers
How to do it...
How it works...
Building a chat application
How to do it...
How it works...
There's more...
Creating and working with add-ons
How to do it...
Testing the sockjs-chat add-on
Publishing the sockjs-chat add-on
How it works...
See also
Learning the Ember run loop
Getting ready
Understanding Ember run queues
When should you change the Ember run loop?
Working with the Ember.run namespace
How to do it...
How it works...
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜