Skip to content

Commit 896db4a

Browse files
committed
Merge pull request #45 from endel/patch-1
typo on "constructor"
2 parents aac9dd2 + e0d2daf commit 896db4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/guide/components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var MyComponent = Vue.extend({
1414
})
1515
```
1616

17-
Most of the options that can be passed into the Vue constructor can be used in `Vue.extend()`, however, there are two special cases, `data` and `el`. Since each Vue instance should have its own `$data` and `$el`, we obviously don't want the value we passed into `Vue.extend()` to be shared across all instances created from that constrcutor. So when you want to define how a component should initalize its default data or element, you should pass in a function instead:
17+
Most of the options that can be passed into the Vue constructor can be used in `Vue.extend()`, however, there are two special cases, `data` and `el`. Since each Vue instance should have its own `$data` and `$el`, we obviously don't want the value we passed into `Vue.extend()` to be shared across all instances created from that constructor. So when you want to define how a component should initalize its default data or element, you should pass in a function instead:
1818

1919
``` js
2020
var ComponentWithDefaultData = Vue.extend({

0 commit comments

Comments
 (0)