Skip to content

Commit 59fa39c

Browse files
committed
spelling and grammar fixes
1 parent 8ec3260 commit 59fa39c

14 files changed

+38
-38
lines changed

source/api/directives.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Apply inline CSS styles to the element.
6565

6666
When there is no argument, Vue.js will use the value to set `el.style.cssText`.
6767

68-
When there is an argument, it will be used as the CSS property to apply. Combined with multiple clause you can set multiple properties together:
68+
When there is an argument, it will be used as the CSS property to apply. Combined with multiple clauses you can set multiple properties together:
6969

7070
**Example:**
7171

@@ -108,7 +108,7 @@ Conditionally insert / remove the element based on the truthy-ness of the bindin
108108
### v-repeat
109109

110110
- This directive creates child ViewModels.
111-
- This directive requires the value to be an Array.
111+
- This directive requires the value to be an Array or Object.
112112
- This directive can trigger transitions.
113113
- This directive accepts an optional argument.
114114

@@ -171,7 +171,7 @@ Example inheriting an object:
171171
</div>
172172
```
173173

174-
Example inehriting individual properties (using the same data):
174+
Example inheriting individual properties (using the same data):
175175

176176
```
177177
<div v-with="myName : user.name, myEmail: user.email">
@@ -182,7 +182,7 @@ Example inehriting individual properties (using the same data):
182182

183183
## Literal Directives
184184

185-
> Literal directives treat their attribute value as a plain string; they do not attempt to bind themselves to anything. All they do is executing the `bind()` function with the string value once. Literal directives accept mustache expressions inside their value, but these expressions will be evaludated only once on first compile and do not react to data changes.
185+
> Literal directives treat their attribute value as a plain string; they do not attempt to bind themselves to anything. All they do is executing the `bind()` function with the string value once. Literal directives accept mustache expressions inside their value, but these expressions will be evaluated only once on first compile and do not react to data changes.
186186
187187
### v-component
188188

@@ -212,7 +212,7 @@ For details, see [the guide](/guide/transitions.html#JavaScript_Functions).
212212
213213
### v-transition
214214

215-
Notify Vue.js to apply transition CSS classes to this element. The transition classes are applied when certain transition-triggering directives modifies the element, or when the ViewModel's DOM manipulation methods are called.
215+
Notify Vue.js to apply transition CSS classes to this element. The transition classes are applied when certain transition-triggering directives modify the element, or when the ViewModel's DOM manipulation methods are called.
216216

217217
For details, see [the guide](/guide/transitions.html#Css_Transitions).
218218

@@ -224,7 +224,7 @@ For details, see [the guide](/guide/transitions.html#Css_Animations).
224224

225225
### v-pre
226226

227-
Skip compilation for this element and all its children. Skipping large amount of nodes with no directives on them can speed up compilation.
227+
Skip compilation for this element and all its children. Skipping large numbers of nodes with no directives on them can speed up compilation.
228228

229229
### v-cloak
230230

source/api/filters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Finally, you can use quotes to indicate literal arguments:
114114
- this filter only works in `v-repeat`
115115
- this is a computed filter
116116

117-
Sort `v-repeat`'s displayed result. The `sorKey` argument is a property key on the context ViewModel. The value of that property will be used as the key to sort the Array items with. The optional `reverseKey` argument is also a property key on the context ViewModel, but the value's truthiness will determine whether the result should be reversed.
117+
Sort `v-repeat`'s displayed result. The `sortKey` argument is a property key on the context ViewModel. The value of that property will be used as the key to sort the Array items with. The optional `reverseKey` argument is also a property key on the context ViewModel, but the value's truthiness will determine whether the result should be reversed.
118118

119119
``` html
120120
<ul>

source/api/global-methods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Will result in:
152152

153153
- **callback** `Function`
154154

155-
Vue.js batches view updates and execute them all asynchronously. It uses `requestAnimationFrame` if available and fallsback to `setTimeout(fn, 0)`. This method calls the callback after the next view update, which can be useful when you want to wait until the view has been updated.
155+
Vue.js batches view updates and executes them all asynchronously. It uses `requestAnimationFrame` if available and falls back to `setTimeout(fn, 0)`. This method calls the callback after the next view update, which can be useful when you want to wait until the view has been updated.
156156

157157
### Vue.require( module )
158158

source/api/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type: api
33
order: 1
44
---
55

6-
The `Vue` Class is the core of vue.js. It is a constructor that allows you to create ViewModel instances. Creating a ViewModel instance is straightforward:
6+
The `Vue` Class is the core of Vue.js. It is a constructor that allows you to create ViewModel instances. Creating a ViewModel instance is straightforward:
77

88
``` js
99
var vm = new Vue({ /* options */ })
@@ -15,10 +15,10 @@ During the compilation phase, Vue.js walks through the DOM and compiles the dire
1515

1616
Each ViewModel instance has an associated DOM element `$el`, which is essentially the V in MVVM. It also has an associated JavaScript object `$data`, which is essentially the M in MVVM. Changing the M results in updates in the V. For two-way bindings, inputs in the V results in changes in the M. For more details check out [Instance Properties](/api/instance-properties.html).
1717

18-
ViewModel instances proxies access to their `$data` objects, so if you have `vm.$data.msg` you can also access it as `vm.msg`. This might look a bit magical, but is totally optional. You can stick to `vm.$data.msg` for more explicit data access. However it is still important to notice the difference between `vm` and `vm.$data`, since the former cannot be observed by other ViewModels as data.
18+
ViewModel instances proxy access to their `$data` objects, so if you have `vm.$data.msg` you can also access it as `vm.msg`. This might look a bit magical, but is totally optional. You can stick to `vm.$data.msg` for more explicit data access. However it is still important to notice the difference between `vm` and `vm.$data`, since the former cannot be observed by other ViewModels as data.
1919

2020
It's also worth noting that data objects do not necessarily belong to a single ViewModel - multiple ViewModels can observe the same piece of data, whether directly as `$data` or nested under it. This is useful when multiple components need to react to a shared global state object.
2121

22-
Each ViewModel instance also has a number of [Instance Methods](/api/instance-methods.html) which covers data observation, event communication and dom manipulation.
22+
Each ViewModel instance also has a number of [Instance Methods](/api/instance-methods.html) which cover data observation, event communication and DOM manipulation.
2323

2424
Finally, the `Vue` constructor itself also holds several [Global Methods](/api/global-methods.html), which allow you to extend the `Vue` class, configure global settings and register global custom assets such as components, directives, filters and more.

source/api/instance-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ Attach a one-time only listener for an event.
7878
- **event** `String` *optional*
7979
- **callback** `Function` *optional*
8080

81-
If no arguments are given, stop listening for all events; If only the event is given, remove all callbacks for that event; If both event and callback are given, remove that specific callback only.
81+
If no arguments are given, stop listening for all events; if only the event is given, remove all callbacks for that event; if both event and callback are given, remove that specific callback only.
8282

8383
## DOM Manipulation
8484

85-
> All vm DOM manipulation methods work like their jQuery counterparts - except they also trigger vue.js transitions if there are any declared on vm's `$el`. For more details on transitions see [Adding Transition Effects](/guide/transitions.html).
85+
> All vm DOM manipulation methods work like their jQuery counterparts - except they also trigger Vue.js transitions if there are any declared on vm's `$el`. For more details on transitions see [Adding Transition Effects](/guide/transitions.html).
8686
8787
### vm.$appendTo( element | selector )
8888

source/api/instance-properties.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ new Vue({
3636
- **Type:** `Object`
3737
- **Read only**
3838

39-
An object that holds child ViewModels that has `v-ref` registered. For more details see [v-ref](/api/directives.html#v-ref).
39+
An object that holds child ViewModels that have `v-ref` registered. For more details see [v-ref](/api/directives.html#v-ref).
4040

4141
### vm.$index
4242

@@ -56,7 +56,7 @@ The parent ViewModel, if the current ViewModel has one.
5656
- **Type:** `Object ViewModel`
5757
- **Read only**
5858

59-
The root ViewModel. It the current ViewModel has no parents this value will be itself.
59+
The root ViewModel. If the current ViewModel has no parents this value will be itself.
6060

6161
### vm.$compiler
6262

source/api/instantiation-options.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ vm.a // 3
3333

3434
The object must be JSON-compliant (no circular references). You can use it just like an ordinary object, and it will look exactly the same when serialized with `JSON.stringify`. You can also share it between multiple ViewModels.
3535

36-
<p class="tip">Under the hood, vue.js attaches a hidden property `__emitter__` and recursively converts the object's non-function properties into getters and setters that trigger events when called. Properties with keys that starts with `$` or `_` are skipped.</p>
36+
<p class="tip">Under the hood, Vue.js attaches a hidden property `__emitter__` and recursively converts the object's non-function properties into getters and setters that trigger events when called. Properties with keys that starts with `$` or `_` are skipped.</p>
3737

3838
### methods
3939

@@ -131,7 +131,7 @@ A string template to be inserted into `vm.$el`. Any existing markup inside `vm.$
131131

132132
If it starts with `#` it will be used as a querySelector and use the selected element's innerHTML and the template string. This allows the use of the common `<script type="x-template">` trick to include templates.
133133

134-
<p class="tip">Vue.js uses DOM-based templating. The compiler walks through DOM elements and looks for directives and creates data bindings. This means all vue.js templates are parsable HTML that can be converted into actual DOM elements by the browser. Vue.js converts string templates into DOM fragments so they can be cloned when creating more ViewModel instances. If you want your templates to be valid HTML, you can configure the directive prefix to start with `data-`.</p>
134+
<p class="tip">Vue.js uses DOM-based templating. The compiler walks through DOM elements and looks for directives and creates data bindings. This means all Vue.js templates are parsable HTML that can be converted into actual DOM elements by the browser. Vue.js converts string templates into DOM fragments so they can be cloned when creating more ViewModel instances. If you want your templates to be valid HTML, you can configure the directive prefix to start with `data-`.</p>
135135

136136
### replace
137137

@@ -217,7 +217,7 @@ These are private assets that will be available only to this ViewModel and its c
217217

218218
- **Type:** `Object`
219219

220-
An hash of directives to be made available to the ViewModel. For details on how to write a custom directive, see [Writing Custom Directives](/guide/directives.html#Writing_a_Custom_Directive).
220+
A hash of directives to be made available to the ViewModel. For details on how to write a custom directive, see [Writing Custom Directives](/guide/directives.html#Writing_a_Custom_Directive).
221221

222222
### filters
223223

@@ -263,6 +263,6 @@ This option is useful when you need to manually manage the lifecycle of nested V
263263
- **Type:** `Boolean`
264264
- **Default:** `false`
265265

266-
Whether to trigger `v-model` updates only on `change` event (hit enter or lose focus) or on every `input` event (on every keystroke).
266+
Whether to trigger `v-model` updates only on `change` events (hit enter or lose focus) or on every `input` event (on every keystroke).
267267

268268
**Note:** since 0.10.5 child ViewModels will inherit their parents' `lazy` option if they don't have the option set on themselves.

source/guide/application.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Alternatively, [Browserify](http://browserify.org/) is another excellent CommonJ
1717

1818
## Modularization
1919

20-
Component as a built tool not only deals with JavaScript; it can also build CSS, templates and other assets. With builder hooks it can also pre-process files written in non-native formats, e.g. CoffeeScript, SASS and Stylus. Therefore it is possible to deliver highly self-contained components that encapsulates template structure, JavaScript logic and CSS presentation at the same time. A simple example can be found [here](https://github.com/vuejs/vue-component-example/tree/master/src/components/a).
20+
Component as a build tool not only deals with JavaScript; it can also build CSS, templates and other assets. With builder hooks it can also pre-process files written in non-native formats, e.g. CoffeeScript, SASS and Stylus. Therefore it is possible to deliver highly self-contained components that encapsulate template structure, JavaScript logic and CSS presentation at the same time. A simple example can be found [here](https://github.com/vuejs/vue-component-example/tree/master/src/components/a).
2121

2222
Similar modularization can be achieved in Browserify too, with transform plugins such as [partialify](https://github.com/bclinkinbeard/partialify). A simple setup example can be found [here](https://github.com/vuejs/vue-browserify-example).
2323

@@ -47,11 +47,11 @@ The `home` component will be rendered in place of `v-view`. When `currentView`'s
4747

4848
<p class="tip">`v-view` will replace the element it's bound to with the new instantiated VM's element, so avoid using it on your root element.</p>
4949

50-
With `v-view` it's very easy to leverage standalone routing libraries such as [Page.js](https://github.com/visionmedia/page.js) and [Director](https://github.com/flatiron/director). There is plan to provide a vue-router component that integrates with Vue.js for easier routing and deep linking.
50+
With `v-view` it's very easy to leverage standalone routing libraries such as [Page.js](https://github.com/visionmedia/page.js) and [Director](https://github.com/flatiron/director). There is a plan to provide a vue-router component that integrates with Vue.js for easier routing and deep linking.
5151

5252
## Communication with Server
5353

54-
All Vue.js ViewModels can have their raw `$data` directly serialized with `JSON.stringify()` with no additional effort. You can use any Ajax component you like, for example [SuperAgent](https://github.com/visionmedia/superagent). It also plays nicely with no-backend services such as Firebase. In addition there is plan to provide a vue-resource component that resembles Angular's `$resource`, to make interfacing with a REST API easier.
54+
All Vue.js ViewModels can have their raw `$data` directly serialized with `JSON.stringify()` with no additional effort. You can use any Ajax component you like, for example [SuperAgent](https://github.com/visionmedia/superagent). It also plays nicely with no-backend services such as Firebase. In addition there is a plan to provide a vue-resource component that resembles Angular's `$resource`, to make interfacing with a REST API easier.
5555

5656
## Unit Testing
5757

source/guide/composition.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ order: 10
55

66
## Registering a Component
77

8-
Vue.js allows you to treat registered ViewModel constructors as reusable components that is conceptually similar to [Web Components](http://www.w3.org/TR/components-intro/), without requiring any polyfills. To register a component, first create a subclass constructor of Vue using `Vue.extend()`, then use the global `Vue.component()` method to register that constructor:
8+
Vue.js allows you to treat registered ViewModel constructors as reusable components that are conceptually similar to [Web Components](http://www.w3.org/TR/components-intro/), without requiring any polyfills. To register a component, first create a subclass constructor of Vue using `Vue.extend()`, then use the global `Vue.component()` method to register that constructor:
99

1010
``` js
1111
// Extend Vue to get a reusable constructor
@@ -44,7 +44,7 @@ If you prefer, components can also be used in the form of a custom element tag:
4444

4545
It is important to understand the difference between `Vue.extend()` and `Vue.component()`. Since `Vue` itself is a constructor, `Vue.extend()` is a **class inheritance method**. Its task is to create a sub-class of `Vue` and return the constructor. `Vue.component()`, on the other hand, is an **asset registration method** similar to `Vue.directive()` and `Vue.filter()`. Its task is to associate a given constructor with a string ID so Vue.js can pick it up in templates. When directly passing in options to `Vue.component()`, it calls `Vue.extend()` under the hood.
4646

47-
Vue.js supports two different API paradigms: the class-based, imperative, Backbone style API, and the markup-based, declarative, Web Components style API. If you are confused, think about how you can create an image element with `new Image()`, or with an `<img>` tag. Both are useful in its own right and Vue.js tries to provide both for maximum flexibility.
47+
Vue.js supports two different API paradigms: the class-based, imperative, Backbone style API, and the markup-based, declarative, Web Components style API. If you are confused, think about how you can create an image element with `new Image()`, or with an `<img>` tag. Each is useful in its own right and Vue.js tries to provide both for maximum flexibility.
4848

4949
## Data Inheritance
5050

@@ -280,7 +280,7 @@ var MyComponent = Vue.extend({
280280
})
281281
```
282282

283-
Alternatively, you can add private assets to an existing Component constructor using a chaining API similar to the global asset registeration methods:
283+
Alternatively, you can add private assets to an existing Component constructor using a chaining API similar to the global asset registration methods:
284284

285285
``` js
286286
MyComponent
@@ -294,7 +294,7 @@ MyComponent
294294

295295
### Single insertion point
296296

297-
When creating reusable components, we often need to access and reuse the original content in the hosting element, which are not part of the component. Vue.js implements a content insertion mechanism that is compatible with the current Web Components spec draft, using the special `<content>` element to serve as insertion points for the original content. When there is only one `<content>` tag with no attributes, the entire original content will be inserted at its position in the DOM and replaces it. Anything originally inside the `<content>` tags are considered **fallback content**. Fallback content will only be displayed if the hosting element is empty and has no content to be inserted. For example:
297+
When creating reusable components, we often need to access and reuse the original content in the hosting element, which are not part of the component. Vue.js implements a content insertion mechanism that is compatible with the current Web Components spec draft, using the special `<content>` element to serve as insertion points for the original content. When there is only one `<content>` tag with no attributes, the entire original content will be inserted at its position in the DOM and replaces it. Anything originally inside the `<content>` tags is considered **fallback content**. Fallback content will only be displayed if the hosting element is empty and has no content to be inserted. For example:
298298

299299
Template for `my-component`:
300300

0 commit comments

Comments
 (0)