X Tutup
Skip to content

Commit 3fd898e

Browse files
committed
docs(cheatsheet): copyedit
Fixed a few little things. I'll probably have more changes to make later, once I understand everything better. Also added a missing syntax line. Closes angular#5806
1 parent a66cc50 commit 3fd898e

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

modules/angular2/docs/cheatsheet/bootstrapping.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Bootstrapping
99
syntax:
1010
`bootstrap​(MyAppComponent, [MyService, provide(...)]);`|`provide`
1111
description:
12-
Bootstraps an application with MyAppComponent as the root component and configures the DI providers.
12+
Bootstraps an application with MyAppComponent as the root component, and
13+
configures the app's dependency injection providers.

modules/angular2/docs/cheatsheet/built-in-directives.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ Conditionally swaps the contents of the div by selecting one of the embedded tem
3131
syntax:
3232
`<div [ngClass]="{active: isActive, disabled: isDisabled}">`|`[ngClass]`
3333
description:
34-
Binds the presence of css classes on the element to the truthiness of the associated map values. The right-hand side expression should return {class-name: true/false} map.
35-
34+
Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand side expression should return {class-name: true/false} map.

modules/angular2/docs/cheatsheet/component-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ syntax:
1717
`template: 'Hello {{name}}'
1818
templateUrl: 'my-component.html'`|`template:`|`templateUrl:`
1919
description:
20-
Inline template / external template url of the component's view.
20+
Inline template / external template URL of the component's view.
2121

2222

2323
@cheatsheetItem
2424
syntax:
2525
`styles: ['.primary {color: red}']
2626
styleUrls: ['my-component.css']`|`styles:`|`styleUrls:`
2727
description:
28-
List of inline css styles / external stylesheet urls for styling component’s view.
28+
List of inline CSS styles / external stylesheet URLs for styling component’s view.
2929

3030

3131
@cheatsheetItem
@@ -39,4 +39,4 @@ List of directives used in the the component’s template.
3939
syntax:
4040
`pipes: [MyPipe, OtherPipe]`|`pipes:`
4141
description:
42-
List of pipes used in the component's template.
42+
List of pipes used in the component's template.

modules/angular2/docs/cheatsheet/directive-and-component-decorators.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ Class field decorators for directives and components
99
syntax:
1010
`@Input() myProperty;`|`@Input()`
1111
description:
12-
Declares an input property that we can update via property binding, e.g.
13-
`<my-cmp [my-property]="someExpression">`
12+
Declares an input property that we can update via property binding (e.g.
13+
`<my-cmp [my-property]="someExpression">`).
1414

1515

1616
@cheatsheetItem
1717
syntax:
1818
`@Output() myEvent = new EventEmitter();`|`@Output()`
1919
description:
20-
Declares an output property that fires events to which we can subscribe with an event binding, e.g. `<my-cmp (my-event)="doSomething()">`
20+
Declares an output property that fires events to which we can subscribe with an event binding (e.g. `<my-cmp (my-event)="doSomething()">`).
2121

2222

2323
@cheatsheetItem
2424
syntax:
2525
`@HostBinding('[class.valid]') isValid;`|`@HostBinding('[class.valid]')`
2626
description:
27-
Binds a host element property (e.g. css class valid) to directive/component property (e.g. isValid)
27+
Binds a host element property (e.g. CSS class valid) to directive/component property (e.g. isValid).
2828

2929

3030

3131
@cheatsheetItem
3232
syntax:
3333
`@HostListener('click', ['$event']) onClick(e) {...}`|`@HostListener('click', ['$event'])`
3434
description:
35-
Subscribes to a host element event (e.g. click) with a directive/component method (e.g., onClick), optionally passing an argument ($event)
35+
Subscribes to a host element event (e.g. click) with a directive/component method (e.g. onClick), optionally passing an argument ($event).
3636

3737

3838
@cheatsheetItem

modules/angular2/docs/cheatsheet/directive-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Directive configuration
99
syntax:
1010
`selector: '.cool-button:not(a)'`|`selector:`
1111
description:
12-
Specifies a css selector that identifies this directive within a template. Supported selectors include: `element`,
12+
Specifies a CSS selector that identifies this directive within a template. Supported selectors include `element`,
1313
`[attribute]`, `.class`, and `:not()`.
1414

1515
Does not support parent-child relationship selectors.

modules/angular2/docs/cheatsheet/routing.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class MyComponent() {}`|`@RouteConfig`
1717
syntax(dart):
1818
`@RouteConfig(const [
1919
const Route(path: '/:myParam', component: MyComponent, name: 'MyCmp' ),
20-
])`
20+
])`|`@RouteConfig`
2121
description:
22-
Configures routes for the decorated component. Supports static, parameterized and wildcard routes.
22+
Configures routes for the decorated component. Supports static, parameterized, and wildcard routes.
2323

2424

2525
@cheatsheetItem
@@ -30,6 +30,7 @@ Marks the location to load the component of the active route.
3030

3131

3232
@cheatsheetItem
33+
syntax:
3334
`<a [routerLink]="[ '/MyCmp', {myParam: 'value' } ]">`|`[routerLink]`
3435
description:
3536
Creates a link to a different view based on a route instruction consisting of a route name and optional parameters. The route name matches the as property of a configured route. Add the '/' prefix to navigate to a root route; add the './' prefix for a child route.
@@ -41,21 +42,21 @@ syntax(js ts):
4142
syntax(dart):
4243
`@CanActivate(() => ...)class MyComponent() {}`|`@CanActivate`
4344
description:
44-
A component decorator defining a function that the router should call first to determine if it should activate this component. Should return a boolean or a promise.
45+
A component decorator defining a function that the router should call first to determine if it should activate this component. Should return a boolean or a {@target js ts}promise{@endtarget}{@target dart}future{@endtarget}.
4546

4647

4748
@cheatsheetItem
4849
syntax:
4950
`routerOnActivate(nextInstruction, prevInstruction) { ... }`|`routerOnActivate`
5051
description:
51-
After navigating to a component, the router calls component's routerOnActivate method (if defined).
52+
After navigating to a component, the router calls the component's routerOnActivate method (if defined).
5253

5354

5455
@cheatsheetItem
5556
syntax:
5657
`routerCanReuse(nextInstruction, prevInstruction) { ... }`|`routerCanReuse`
5758
description:
58-
The router calls a component's routerCanReuse method (if defined) to determine whether to reuse the instance or destroy it and create a new instance. Should return a boolean or a promise.
59+
The router calls a component's routerCanReuse method (if defined) to determine whether to reuse the instance or destroy it and create a new instance. Should return a boolean or a {@target js ts}promise{@endtarget}{@target dart}future{@endtarget}.
5960

6061

6162
@cheatsheetItem
@@ -69,11 +70,11 @@ The router calls the component's routerOnReuse method (if defined) when it re-us
6970
syntax:
7071
`routerCanDeactivate(nextInstruction, prevInstruction) { ... }`|`routerCanDeactivate`
7172
description:
72-
The router calls the routerCanDeactivate methods (if defined) of every component that would be removed after a navigation. The navigation proceeds if and only if all such methods return true or a promise that is resolved.
73+
The router calls the routerCanDeactivate methods (if defined) of every component that would be removed after a navigation. The navigation proceeds if and only if all such methods return true or a {@target js ts}promise that is resolved{@endtarget}{@target dart}future that completes successfully{@endtarget}.
7374

7475

7576
@cheatsheetItem
7677
syntax:
7778
`routerOnDeactivate(nextInstruction, prevInstruction) { ... }`|`routerOnDeactivate`
7879
description:
79-
Called before the directive is removed as the result of a route change. May return a promise that pauses removing the directive until the promise resolves.
80+
Called before the directive is removed as the result of a route change. May return a {@target js ts}promise{@endtarget}{@target dart}future{@endtarget} that pauses removing the directive until the {@target js ts}promise resolves{@endtarget}{@target dart}future completes{@endtarget}.

modules/angular2/docs/cheatsheet/template-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Binds attribute `role` to the result of expression `myAriaRole`.
1919
syntax:
2020
`<div [class.extra-sparkle]="isDelightful">`|`[class.extra-sparkle]`
2121
description:
22-
Binds the presence of the css class `extra-sparkle` on the element to the truthiness of the expression `isDelightful`.
22+
Binds the presence of the CSS class `extra-sparkle` on the element to the truthiness of the expression `isDelightful`.
2323

2424
@cheatsheetItem
2525
syntax:

0 commit comments

Comments
 (0)
X Tutup