Skip to content

Commit ae90de0

Browse files
committed
yak shaving
1 parent 57ea6c6 commit ae90de0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ It's really really easy to get started. Seriously, it's so easy:
2525

2626
``` js
2727
var demo = new Vue({
28+
el: '#demo',
2829
data: {
2930
message: 'Hello Vue.js!'
3031
}
31-
}).$mount('#demo')
32+
})
3233
```
3334

3435
To check out the live demo, guides and API reference, visit [vuejs.org](http://vuejs.org).

changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var vm = new Vue({ el: '#app', data: {a: 1} })
3636
3737
In the previous version, nested Vue instances do not have prototypal inheritance of their data scope. Although you can access parent data properties in templates, you need to explicitly travel up the scope chain with `this.$parent` in JavaScript code or use `this.$get()` to get a property on the scope chain. The expression parser also needs to do a lot of dirty work to determine the correct scope the variables belong to.
3838

39-
In the new model, we provide a scope inehritance system similar to Angular, in which you can directly access properties that exist on parent scopes. The major difference is that setting a primitive value property on a child scope WILL affect that on the parent scope! Because all data properties in Vue are getter/setters, so setting a property with the same key as parent on a child will not cause the child scope to create a new property shadowing the parent one, but rather it will just invoke the parent's setter function. See the example [here](http://jsfiddle.net/Px2n6/2/).
39+
In the new model, we provide a scope inheritance system similar to Angular, in which you can directly access properties that exist on parent scopes. The major difference is that setting a primitive value property on a child scope WILL affect that on the parent scope! Because all data properties in Vue are getter/setters, so setting a property with the same key as parent on a child will not cause the child scope to create a new property shadowing the parent one, but rather it will just invoke the parent's setter function. See the example [here](http://jsfiddle.net/Px2n6/2/).
4040

4141
The result of this model is a much cleaner expression evaluation implementation. All expressions can simply be evaluated against the vm.
4242

0 commit comments

Comments
 (0)