diff --git a/source/api/options.md b/source/api/options.md index db550deb65..e1f948d458 100644 --- a/source/api/options.md +++ b/source/api/options.md @@ -103,7 +103,7 @@ vm.a // -> 2 vm.aDouble // -> 4 ``` -### paramAttributes +### props - **Type:** `Array` @@ -113,7 +113,7 @@ An array of attribute names to be set on the Vue instance as initial data. Usefu ``` js Vue.component('param-demo', { - paramAttributes: ['size', 'message'], + props: ['size', 'message'], compiled: function () { console.log(this.size) // -> 100 console.log(this.message) // -> 'hello!' @@ -125,15 +125,14 @@ Vue.component('param-demo', { ``` -Param attributes can also contain interpolation tags. The interpolation will be evaluated against the parent, and under the hood they will be compiled as [`v-with`](/api/directives.html#v-with), which means when the value of the interpolated expression changes, the component's corresponding property will also be updated: +For passing data more details see the following: -``` html - -``` +- [Prop Binding Types](/guide/components.html#Prop_Binding_Types) +- [Passing Callbacks as Props](/guide/components.html#Passing_Callbacks_as_Props) #### Notes on hyphened attributes -HTML attribute names ignore upper and lower case differences, so we usually use hyphened attributes instead of camel case. There are some special cases when using `paramAttributes` with attributes that contains hyphens: +HTML attribute names ignore upper and lower case differences, so we usually use hyphened attributes instead of camel case. There are some special cases when using `props` with attributes that contains hyphens: 1. If the attribute is a data attribute, the `data-` prefix will be auto stripped; @@ -377,4 +376,4 @@ var Ctor = Vue.extend({ }) var vm = new Ctor() console.log(vm) // -> CoolStuff {$el: null, ...} -``` \ No newline at end of file +```