misc(docs): Edits and additions for Forms and Change Detection

This commit is contained in:
Naomi Black
2015-04-13 21:00:52 -07:00
parent 2d09f84182
commit 8475c63a6a
5 changed files with 65 additions and 3 deletions

View File

@ -9,6 +9,29 @@ export class ProtoChangeDetector {
}
}
/**
* Interface used by Angular to control the change detection strategy for an application.
*
* Angular implements the following change detection strategies by default:
*
* - [dynamicChangeDetection]: slower, but does not require `eval()`.
* - [jitChangeDetection]: faster, but requires `eval()`.
*
* In JavaScript, you should always use `jitChangeDetection`, unless you are in an environment that has
* [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
*
* In Dart, use `dynamicChangeDetection` during development. The Angular transformer generates an analog to the
* `jitChangeDetection` strategy at compile time.
*
*
* See: [dynamicChangeDetection], [jitChangeDetection]
*
* # Example
* ```javascript
* bootstrap(MyApp, [bind(ChangeDetection).toValue(dynamicChangeDetection)]);
* ```
* @exportedAs angular2/change_detection
*/
export class ChangeDetection {
createProtoChangeDetector(name:string, changeControlStrategy:string=DEFAULT):ProtoChangeDetector{
return null;

View File

@ -3,6 +3,32 @@ import {isPresent, print} from 'angular2/src/facade/lang';
import {ListWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
/**
* Provides a hook for centralized exception handling.
*
* The default implementation of `ExceptionHandler` prints error messages to the `Console`. To intercept error handling,
* write a custom exception handler that replaces this default as appropriate for your app.
*
* # Example
*
* ```javascript
* @Component({
* selector: 'my-app',
* injectables: [
* bind(ExceptionHandler).toClass(MyExceptionHandler)
* ]
* })
* @View(...)
* class MyApp { ... }
*
*
* class MyExceptionHandler implements ExceptionHandler {
* call(error, stackTrace = null, reason = null) {
* // do something with the exception
* }
* }
*
* ```
*
* @exportedAs angular2/core
*/
@Injectable()

View File

@ -11,7 +11,7 @@ import {UrlResolver} from 'angular2/src/services/url_resolver';
/**
* Strategy to load component templates.
* @exportedAs angular2/core
* TODO: Make public API once we are more confident in this approach.
*/
@Injectable()
export class TemplateLoader {