@@ -18,7 +18,7 @@ import {isBlank} from 'angular2/src/facade/lang';
|
||||
* </div>
|
||||
* ```
|
||||
*
|
||||
*##Syntax
|
||||
* ### Syntax
|
||||
*
|
||||
* - `<div *ng-if="condition">...</div>`
|
||||
* - `<div template="ng-if condition">...</div>`
|
||||
|
||||
@@ -15,7 +15,7 @@ import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
|
||||
* corresponding element styles are updated based on changes to this object. Style names to update
|
||||
* are taken from the object's keys, and values - from the corresponding object's values.
|
||||
*
|
||||
*##Syntax
|
||||
* ### Syntax
|
||||
*
|
||||
* - `<div [ng-style]="{'font-style': style}"></div>`
|
||||
* - `<div [ng-style]="styleExp"></div>` - here the `styleExp` must evaluate to an object
|
||||
|
||||
@@ -18,7 +18,7 @@ const controlGroupProvider =
|
||||
*
|
||||
* This directive can only be used as a child of {@link NgForm} or {@link NgFormModel}.
|
||||
*
|
||||
* # Example ([live demo](http://plnkr.co/edit/7EJ11uGeaggViYM6T5nq?p=preview))
|
||||
* ### Example ([live demo](http://plnkr.co/edit/7EJ11uGeaggViYM6T5nq?p=preview))
|
||||
*
|
||||
* ```typescript
|
||||
* @Component({
|
||||
|
||||
@@ -23,19 +23,19 @@ const formDirectiveProvider =
|
||||
* If `NgForm` is bound in a component, `<form>` elements in that component will be
|
||||
* upgraded to use the Angular form system.
|
||||
*
|
||||
*##Typical Use
|
||||
* ### Typical Use
|
||||
*
|
||||
* Include `FORM_DIRECTIVES` in the `directives` section of a {@link View} annotation
|
||||
* to use `NgForm` and its associated controls.
|
||||
*
|
||||
*##Structure
|
||||
* ### Structure
|
||||
*
|
||||
* An Angular form is a collection of `Control`s in some hierarchy.
|
||||
* `Control`s can be at the top level or can be organized in `ControlGroup`s
|
||||
* or `ControlArray`s. This hierarchy is reflected in the form's `value`, a
|
||||
* JSON object that mirrors the form structure.
|
||||
*
|
||||
*##Submission
|
||||
* ### Submission
|
||||
*
|
||||
* The `ng-submit` event signals when the user triggers a form submission.
|
||||
*
|
||||
|
||||
@@ -49,7 +49,7 @@ const formControlBinding =
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
*##ng-model
|
||||
* ###ng-model
|
||||
*
|
||||
* We can also use `ng-model` to bind a domain model to the form.
|
||||
*
|
||||
|
||||
@@ -22,7 +22,7 @@ const formControlBinding =
|
||||
/**
|
||||
* Binds a domain model to a form control.
|
||||
*
|
||||
*##Usage
|
||||
* ### Usage
|
||||
*
|
||||
* `ng-model` binds an existing domain model to a form control. For a
|
||||
* two-way binding, use `[(ng-model)]` to ensure the model updates in
|
||||
|
||||
@@ -33,7 +33,7 @@ const REQUIRED_VALIDATOR =
|
||||
* A Directive that adds the `required` validator to any controls marked with the
|
||||
* `required` attribute, via the {@link NG_VALIDATORS} binding.
|
||||
*
|
||||
* # Example
|
||||
* ### Example
|
||||
*
|
||||
* ```
|
||||
* <input ng-control="fullName" required>
|
||||
@@ -76,4 +76,4 @@ export class MaxLengthValidator implements Validator {
|
||||
}
|
||||
|
||||
validate(c: Control): {[key: string]: any} { return this._validator(c); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ export abstract class AbstractControl {
|
||||
* `Control` is one of the three fundamental building blocks used to define forms in Angular, along
|
||||
* with {@link ControlGroup} and {@link ControlArray}.
|
||||
*
|
||||
* ##Usage
|
||||
* ## Usage
|
||||
*
|
||||
* By default, a `Control` is created for every `<input>` or other form component.
|
||||
* With {@link NgFormControl} or {@link NgFormModel} an existing {@link Control} can be
|
||||
@@ -421,7 +421,7 @@ export class ControlGroup extends AbstractControl {
|
||||
* along with {@link Control} and {@link ControlGroup}. {@link ControlGroup} can also contain
|
||||
* other controls, but is of fixed length.
|
||||
*
|
||||
* ##Adding or removing controls
|
||||
* ## Adding or removing controls
|
||||
*
|
||||
* To change the controls in the array, use the `push`, `insert`, or `removeAt` methods
|
||||
* in `ControlArray` itself. These methods ensure the controls are properly tracked in the
|
||||
|
||||
@@ -29,7 +29,7 @@ export const NG_ASYNC_VALIDATORS: OpaqueToken = CONST_EXPR(new OpaqueToken("NgAs
|
||||
* controls and returns a {@link StringMap} of errors. A null map means that
|
||||
* validation has passed.
|
||||
*
|
||||
* # Example
|
||||
* ### Example
|
||||
*
|
||||
* ```typescript
|
||||
* var loginControl = new Control("", Validators.required)
|
||||
|
||||
@@ -66,7 +66,7 @@ export class NumberPipe {
|
||||
* Formats a number as local text. i.e. group sizing and separator and other locale-specific
|
||||
* configurations are based on the active locale.
|
||||
*
|
||||
*##Usage
|
||||
* ### Usage
|
||||
*
|
||||
* expression | number[:digitInfo]
|
||||
*
|
||||
@@ -101,7 +101,7 @@ export class DecimalPipe extends NumberPipe implements PipeTransform {
|
||||
*
|
||||
* Formats a number as local percent.
|
||||
*
|
||||
*##Usage
|
||||
* ### Usage
|
||||
*
|
||||
* expression | percent[:digitInfo]
|
||||
*
|
||||
@@ -127,7 +127,7 @@ export class PercentPipe extends NumberPipe implements PipeTransform {
|
||||
*
|
||||
* Formats a number as local currency.
|
||||
*
|
||||
*##Usage
|
||||
* ### Usage
|
||||
*
|
||||
* expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]]
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ import {Pipe} from 'angular2/src/core/metadata';
|
||||
*
|
||||
* The ending index of the subset to return is specified by the optional `end` parameter.
|
||||
*
|
||||
*##Usage
|
||||
* ### Usage
|
||||
*
|
||||
* expression | slice:start[:end]
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user