angular.js/docs/content/cookbook/index.ngdoc

59 lines
2.1 KiB
Text
Raw Normal View History

2011-02-01 18:01:02 +00:00
@ngdoc overview
@name Cookbook
@description
2012-09-26 13:30:55 +00:00
Welcome to the Angular cookbook. Here we will show you typical uses of Angular by example.
2011-02-01 18:01:02 +00:00
# Hello World
2011-06-06 15:50:35 +00:00
{@link helloworld Hello World}: The simplest possible application that demonstrates the
2011-02-01 18:01:02 +00:00
classic Hello World!
# Basic Form
2011-06-06 15:50:35 +00:00
{@link form Basic Form}: Displaying forms to the user for editing is the bread and butter
2011-02-01 18:01:02 +00:00
of web applications. Angular makes forms easy through bidirectional data binding.
# Advanced Form
2011-06-06 15:50:35 +00:00
{@link advancedform Advanced Form}: Taking the form example to the next level and
2011-02-01 18:01:02 +00:00
providing advanced features such as dirty detection, form reverting and submit disabling if
validation errors exist.
# Model View Controller
2011-06-06 15:50:35 +00:00
{@link mvc MVC}: Tic-Tac-Toe: Model View Controller (MVC) is a time-tested design pattern
2011-02-01 18:01:02 +00:00
to separate the behavior (JavaScript controller) from the presentation (HTML view). This
separation aids in maintainability and testability of your project.
# Multi-page App and Deep Linking
2011-06-06 15:50:35 +00:00
{@link deeplinking Deep Linking}: An AJAX application never navigates away from the
2011-02-01 18:01:02 +00:00
first page it loads. Instead, it changes the DOM of its single page. Eliminating full-page reloads
is what makes AJAX apps responsive, but it creates a problem in that apps with a single URL
prevent you from emailing links to a particular screen within your application.
Deep linking tries to solve this by changing the URL anchor without reloading a page, thus
allowing you to send links to specific screens in your app.
# Services
{@link api/ng Services}: Services are long lived objects in your applications that are
2012-09-26 13:30:55 +00:00
available across controllers. A collection of useful services are pre-bundled with Angular but you
2011-02-01 18:01:02 +00:00
will likely add your own. Services are initialized using dependency injection, which resolves the
order of initialization. This safeguards you from the perils of global state (a common way to
implement long lived objects).
# External Resources
2011-06-06 15:50:35 +00:00
{@link buzz Resources}: Web applications must be able to communicate with the external
2011-02-01 18:01:02 +00:00
services to get and update data. Resources are the abstractions of external URLs which are
2012-09-26 13:30:55 +00:00
specially tailored to Angular data binding.