docs: fix links in api docs
This commit is contained in:
parent
5ba8c14893
commit
71f5b73296
|
@ -14,22 +14,18 @@ import {InjectionToken} from '@angular/core';
|
|||
* `PlatformLocation` encapsulates all calls to DOM apis, which allows the Router to be platform
|
||||
* agnostic.
|
||||
* This means that we can have different implementation of `PlatformLocation` for the different
|
||||
* platforms
|
||||
* that angular supports. For example, the default `PlatformLocation` is {@link
|
||||
* BrowserPlatformLocation},
|
||||
* however when you run your app in a WebWorker you use {@link WebWorkerPlatformLocation}.
|
||||
* platforms that angular supports. For example, `@angular/platform-browser` provides an
|
||||
* implementation specific to the browser environment, while `@angular/platform-webworker` provides
|
||||
* one suitable for use with web workers.
|
||||
*
|
||||
* The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
|
||||
* when
|
||||
* they need to interact with the DOM apis like pushState, popState, etc...
|
||||
* when they need to interact with the DOM apis like pushState, popState, etc...
|
||||
*
|
||||
* {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
|
||||
* by
|
||||
* the {@link Router} in order to navigate between routes. Since all interactions between {@link
|
||||
* by the {@link Router} in order to navigate between routes. Since all interactions between {@link
|
||||
* Router} /
|
||||
* {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`
|
||||
* class
|
||||
* they are all platform independent.
|
||||
* class they are all platform independent.
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
|
|
|
@ -162,8 +162,8 @@ export function getPlatform(): PlatformRef|null {
|
|||
* has exactly one platform, and services (such as reflection) which are common
|
||||
* to every Angular application running on the page are bound in its scope.
|
||||
*
|
||||
* A page's platform is initialized implicitly when {@link bootstrap}() is called, or
|
||||
* explicitly by calling {@link createPlatform}().
|
||||
* A page's platform is initialized implicitly when a platform is created via a platform factory
|
||||
* (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
|
@ -344,8 +344,6 @@ export class PlatformRef_ extends PlatformRef {
|
|||
/**
|
||||
* A reference to an Angular application running on a page.
|
||||
*
|
||||
* For more about Angular applications, see the documentation for {@link bootstrap}.
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
export abstract class ApplicationRef {
|
||||
|
|
|
@ -50,7 +50,7 @@ export abstract class Injector {
|
|||
/**
|
||||
* Retrieves an instance from the injector based on the provided token.
|
||||
* If not found:
|
||||
* - Throws {@link NoProviderError} if no `notFoundValue` that is not equal to
|
||||
* - Throws an error if no `notFoundValue` that is not equal to
|
||||
* Injector.THROW_IF_NOT_FOUND is given
|
||||
* - Returns the `notFoundValue` otherwise
|
||||
*/
|
||||
|
|
|
@ -54,14 +54,14 @@ export class Compiler {
|
|||
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> { throw _throwError(); }
|
||||
|
||||
/**
|
||||
* Same as {@link compileModuleSync} but also creates ComponentFactories for all components.
|
||||
* Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
|
||||
*/
|
||||
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {
|
||||
throw _throwError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as {@link compileModuleAsync} but also creates ComponentFactories for all components.
|
||||
* Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
|
||||
*/
|
||||
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>):
|
||||
Promise<ModuleWithComponentFactories<T>> {
|
||||
|
|
|
@ -16,7 +16,8 @@ import {getSymbolIterator} from '../util';
|
|||
* An unmodifiable list of items that Angular keeps up to date when the state
|
||||
* of the application changes.
|
||||
*
|
||||
* The type of object that {@link Query} and {@link ViewQueryMetadata} provide.
|
||||
* The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
|
||||
* provide.
|
||||
*
|
||||
* Implements an iterable interface, therefore it can be used in both ES6
|
||||
* javascript `for (var i of items)` loops as well as in Angular templates with
|
||||
|
|
|
@ -287,7 +287,7 @@ export const ContentChild: ContentChildDecorator = makePropDecorator(
|
|||
/**
|
||||
* Type of the ViewChildren decorator / constructor function.
|
||||
*
|
||||
* See {@ViewChildren}.
|
||||
* See {@link ViewChildren}.
|
||||
*
|
||||
* @stable
|
||||
*/
|
||||
|
|
|
@ -662,8 +662,8 @@ export interface Component extends Directive {
|
|||
* encapsulation.
|
||||
*
|
||||
* When no `encapsulation` is defined for the component, the default value from the
|
||||
* {@link CompilerConfig} is used. The default is `ViewEncapsulation.Emulated`}. Provide a new
|
||||
* `CompilerConfig` to override this value.
|
||||
* {@link CompilerOptions} is used. The default is `ViewEncapsulation.Emulated`}. Provide a new
|
||||
* `CompilerOptions` to override this value.
|
||||
*
|
||||
* If the encapsulation is set to `ViewEncapsulation.Emulated` and the component has no `styles`
|
||||
* nor `styleUrls` the encapsulation will automatically be switched to `ViewEncapsulation.None`.
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
/**
|
||||
* Defines template and style encapsulation options available for Component's {@link Component}.
|
||||
*
|
||||
* See {@link ViewMetadata#encapsulation}.
|
||||
* See {@link Component#encapsulation}.
|
||||
* @stable
|
||||
*/
|
||||
export enum ViewEncapsulation {
|
||||
/**
|
||||
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
||||
* Element and pre-processing the style rules provided via
|
||||
* {@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element
|
||||
* {@link Component#styles} or {@link Component#styleUrls}, and adding the new Host Element
|
||||
* attribute to all selectors.
|
||||
*
|
||||
* This is the default option.
|
||||
|
|
|
@ -13,8 +13,8 @@ import {EventEmitter} from '../event_emitter';
|
|||
*
|
||||
* The most common use of this service is to optimize performance when starting a work consisting of
|
||||
* one or more asynchronous tasks that don't require UI updates or error handling to be handled by
|
||||
* Angular. Such tasks can be kicked off via {@link runOutsideAngular} and if needed, these tasks
|
||||
* can reenter the Angular zone via {@link run}.
|
||||
* Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
|
||||
* can reenter the Angular zone via {@link #run}.
|
||||
*
|
||||
* <!-- TODO: add/fix links to:
|
||||
* - docs explaining zones and the use of zones in Angular and change-detection
|
||||
|
@ -132,7 +132,7 @@ export class NgZone {
|
|||
* the function.
|
||||
*
|
||||
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
||||
* outside of the Angular zone (typically started via {@link runOutsideAngular}).
|
||||
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
||||
*
|
||||
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
||||
* within the Angular zone.
|
||||
|
@ -151,13 +151,14 @@ export class NgZone {
|
|||
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
||||
* the function.
|
||||
*
|
||||
* Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that
|
||||
* Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
||||
* work that
|
||||
* doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
||||
*
|
||||
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
||||
* outside of the Angular zone.
|
||||
*
|
||||
* Use {@link run} to reenter the Angular zone and do work that updates the application model.
|
||||
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
||||
*/
|
||||
runOutsideAngular(fn: () => any): any { return this.outer.run(fn); }
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ const resolvedPromise = Promise.resolve(null);
|
|||
* This directive can be used by itself or as part of a larger form. All you need is the
|
||||
* `ngModel` selector to activate it.
|
||||
*
|
||||
* It accepts a domain model as an optional {@link @Input}. If you have a one-way binding
|
||||
* It accepts a domain model as an optional {@link Input}. If you have a one-way binding
|
||||
* to `ngModel` with `[]` syntax, changing the value of the domain model in the component
|
||||
* class will set the value in the view. If you have a two-way binding with `[()]` syntax
|
||||
* (also known as 'banana-box syntax'), the value in the UI will always be synced back to
|
||||
|
|
|
@ -45,12 +45,12 @@ export const formControlBinding: any = {
|
|||
* {@link AbstractControl}.
|
||||
*
|
||||
* **Set the value**: You can pass in an initial value when instantiating the {@link FormControl},
|
||||
* or you can set it programmatically later using {@link AbstractControl.setValue} or
|
||||
* {@link AbstractControl.patchValue}.
|
||||
* or you can set it programmatically later using {@link AbstractControl#setValue} or
|
||||
* {@link AbstractControl#patchValue}.
|
||||
*
|
||||
* **Listen to value**: If you want to listen to changes in the value of the control, you can
|
||||
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl.statusChanges} to be notified when the validation status is
|
||||
* subscribe to the {@link AbstractControl#valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl#statusChanges} to be notified when the validation status is
|
||||
* re-calculated.
|
||||
*
|
||||
* ### Example
|
||||
|
|
|
@ -45,7 +45,7 @@ export const controlNameBinding: any = {
|
|||
* closest {@link FormGroup} or {@link FormArray} above it.
|
||||
*
|
||||
* **Access the control**: You can access the {@link FormControl} associated with
|
||||
* this directive by using the {@link AbstractControl.get} method.
|
||||
* this directive by using the {@link AbstractControl#get} method.
|
||||
* Ex: `this.form.get('first');`
|
||||
*
|
||||
* **Get value**: the `value` property is always synced and available on the {@link FormControl}.
|
||||
|
@ -53,11 +53,11 @@ export const controlNameBinding: any = {
|
|||
*
|
||||
* **Set value**: You can set an initial value for the control when instantiating the
|
||||
* {@link FormControl}, or you can set it programmatically later using
|
||||
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
|
||||
* {@link AbstractControl#setValue} or {@link AbstractControl#patchValue}.
|
||||
*
|
||||
* **Listen to value**: If you want to listen to changes in the value of the control, you can
|
||||
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl.statusChanges} to be notified when the validation status is
|
||||
* subscribe to the {@link AbstractControl#valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl#statusChanges} to be notified when the validation status is
|
||||
* re-calculated.
|
||||
*
|
||||
* ### Example
|
||||
|
|
|
@ -34,11 +34,11 @@ export const formDirectiveProvider: any = {
|
|||
*
|
||||
* **Set value**: You can set the form's initial value when instantiating the
|
||||
* {@link FormGroup}, or you can set it programmatically later using the {@link FormGroup}'s
|
||||
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue} methods.
|
||||
* {@link AbstractControl#setValue} or {@link AbstractControl#patchValue} methods.
|
||||
*
|
||||
* **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe
|
||||
* to the {@link FormGroup}'s {@link AbstractControl.valueChanges} event. You can also listen to
|
||||
* its {@link AbstractControl.statusChanges} event to be notified when the validation status is
|
||||
* to the {@link FormGroup}'s {@link AbstractControl#valueChanges} event. You can also listen to
|
||||
* its {@link AbstractControl#statusChanges} event to be notified when the validation status is
|
||||
* re-calculated.
|
||||
*
|
||||
* Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has
|
||||
|
|
|
@ -40,7 +40,7 @@ export const formGroupNameProvider: any = {
|
|||
* controls into their own nested object.
|
||||
*
|
||||
* **Access the group**: You can access the associated {@link FormGroup} using the
|
||||
* {@link AbstractControl.get} method. Ex: `this.form.get('name')`.
|
||||
* {@link AbstractControl#get} method. Ex: `this.form.get('name')`.
|
||||
*
|
||||
* You can also access individual controls within the group using dot syntax.
|
||||
* Ex: `this.form.get('name.first')`
|
||||
|
@ -50,11 +50,11 @@ export const formGroupNameProvider: any = {
|
|||
*
|
||||
* **Set the value**: You can set an initial value for each child control when instantiating
|
||||
* the {@link FormGroup}, or you can set it programmatically later using
|
||||
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
|
||||
* {@link AbstractControl#setValue} or {@link AbstractControl#patchValue}.
|
||||
*
|
||||
* **Listen to value**: If you want to listen to changes in the value of the group, you can
|
||||
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl.statusChanges} to be notified when the validation status is
|
||||
* subscribe to the {@link AbstractControl#valueChanges} event. You can also listen to
|
||||
* {@link AbstractControl#statusChanges} to be notified when the validation status is
|
||||
* re-calculated.
|
||||
*
|
||||
* ### Example
|
||||
|
@ -111,7 +111,7 @@ export const formArrayNameProvider: any = {
|
|||
* form controls dynamically.
|
||||
*
|
||||
* **Access the array**: You can access the associated {@link FormArray} using the
|
||||
* {@link AbstractControl.get} method on the parent {@link FormGroup}.
|
||||
* {@link AbstractControl#get} method on the parent {@link FormGroup}.
|
||||
* Ex: `this.form.get('cities')`.
|
||||
*
|
||||
* **Get the value**: the `value` property is always synced and available on the
|
||||
|
@ -119,12 +119,12 @@ export const formArrayNameProvider: any = {
|
|||
*
|
||||
* **Set the value**: You can set an initial value for each child control when instantiating
|
||||
* the {@link FormArray}, or you can set the value programmatically later using the
|
||||
* {@link FormArray}'s {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}
|
||||
* {@link FormArray}'s {@link AbstractControl#setValue} or {@link AbstractControl#patchValue}
|
||||
* methods.
|
||||
*
|
||||
* **Listen to value**: If you want to listen to changes in the value of the array, you can
|
||||
* subscribe to the {@link FormArray}'s {@link AbstractControl.valueChanges} event. You can also
|
||||
* listen to its {@link AbstractControl.statusChanges} event to be notified when the validation
|
||||
* subscribe to the {@link FormArray}'s {@link AbstractControl#valueChanges} event. You can also
|
||||
* listen to its {@link AbstractControl#statusChanges} event to be notified when the validation
|
||||
* status is re-calculated.
|
||||
*
|
||||
* **Add new controls**: You can add new controls to the {@link FormArray} dynamically by
|
||||
|
|
|
@ -886,7 +886,7 @@ export class FormGroup extends AbstractControl {
|
|||
* Check whether there is an enabled control with the given name in the group.
|
||||
*
|
||||
* It will return false for disabled controls. If you'd like to check for
|
||||
* existence in the group only, use {@link AbstractControl.get} instead.
|
||||
* existence in the group only, use {@link AbstractControl#get} instead.
|
||||
*/
|
||||
contains(controlName: string): boolean {
|
||||
return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;
|
||||
|
|
|
@ -24,9 +24,6 @@ function isEmptyInputValue(value: any): boolean {
|
|||
*
|
||||
* Provide this using `multi: true` to add validators.
|
||||
*
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'}
|
||||
* @stable
|
||||
*/
|
||||
export const NG_VALIDATORS = new InjectionToken<Array<Validator|Function>>('NgValidators');
|
||||
|
|
|
@ -13,8 +13,9 @@ import {WebWorkerPlatformLocation} from './platform_location';
|
|||
|
||||
|
||||
/**
|
||||
* Those providers should be added when the router is used in a worker context in addition to the
|
||||
* {@link ROUTER_PROVIDERS} and after them.
|
||||
* The {@link PlatformLocation} providers that should be added when the {@link Location} is used in
|
||||
* a worker context.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
export const WORKER_APP_LOCATION_PROVIDERS = [
|
||||
|
|
|
@ -20,7 +20,6 @@ import {UrlSegment, UrlSegmentGroup} from './url_tree';
|
|||
* - `path` is a string that uses the route matcher DSL.
|
||||
* - `pathMatch` is a string that specifies the matching strategy.
|
||||
* - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.
|
||||
* See {@link UrlMatcher} for more info.
|
||||
* - `component` is a component type.
|
||||
* - `redirectTo` is the url fragment which will replace the current matched segment.
|
||||
* - `outlet` is the name of the outlet the component should be placed into.
|
||||
|
|
|
@ -92,7 +92,7 @@ export class RouterOutlet implements OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
/** @deprecated since v4, use {@link activateWith} */
|
||||
/** @deprecated since v4, use {@link #activateWith} */
|
||||
activate(
|
||||
activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver, injector: Injector,
|
||||
providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap): void {
|
||||
|
|
Loading…
Reference in New Issue