37 lines
2.5 KiB
HTML
Executable file
37 lines
2.5 KiB
HTML
Executable file
<a href="http://github.com/angular/angular.js/edit/master/docs/content/cookbook/index.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable=""></code>
|
|
<div><span class="hint"></span>
|
|
</div>
|
|
</h1>
|
|
<div><div class="cookbook-page"><p>Welcome to the Angular cookbook. Here we will show you typical uses of Angular by example.</p>
|
|
<h2>Hello World</h1>
|
|
<p><a href="cookbook/helloworld">Hello World</a>: The simplest possible application that demonstrates the
|
|
classic Hello World!</p>
|
|
<h1>Basic Form</h1>
|
|
<p><a href="cookbook/form">Basic Form</a>: Displaying forms to the user for editing is the bread and butter
|
|
of web applications. Angular makes forms easy through bidirectional data binding.</p>
|
|
<h1>Advanced Form</h1>
|
|
<p><a href="cookbook/advancedform">Advanced Form</a>: Taking the form example to the next level and
|
|
providing advanced features such as dirty detection, form reverting and submit disabling if
|
|
validation errors exist.</p>
|
|
<h1>Model View Controller</h1>
|
|
<p><a href="cookbook/mvc">MVC</a>: Tic-Tac-Toe: Model View Controller (MVC) is a time-tested design pattern
|
|
to separate the behavior (JavaScript controller) from the presentation (HTML view). This
|
|
separation aids in maintainability and testability of your project.</p>
|
|
<h1>Multi-page App and Deep Linking</h1>
|
|
<p><a href="cookbook/deeplinking">Deep Linking</a>: An AJAX application never navigates away from the
|
|
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.</p>
|
|
<p>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.</p>
|
|
<h1>Services</h1>
|
|
<p><a href="api/ng">Services</a>: Services are long lived objects in your applications that are
|
|
available across controllers. A collection of useful services are pre-bundled with Angular but you
|
|
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).</p>
|
|
<h1>External Resources</h2>
|
|
<p><a href="cookbook/buzz">Resources</a>: Web applications must be able to communicate with the external
|
|
services to get and update data. Resources are the abstractions of external URLs which are
|
|
specially tailored to Angular data binding.</p>
|
|
</div></div>
|