From dd86f560ebd39e5539bcff1a16e1d4e4ea19da63 Mon Sep 17 00:00:00 2001 From: Valeriy S Date: Fri, 30 Nov 2018 16:17:02 +0300 Subject: [PATCH] fix(guide): escape tags in the vue components guide --- guide/english/vue/components/index.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guide/english/vue/components/index.md b/guide/english/vue/components/index.md index 8a2406be8d..1f70117d21 100644 --- a/guide/english/vue/components/index.md +++ b/guide/english/vue/components/index.md @@ -41,6 +41,7 @@ you want to bind some attribute to a variable, you can prepend a `:` to the attribute name instead of using the full form `v-bind`. With this code, we did a lot of new things: + * we created a new component called `feature-card` * we defined `feature-card` default **structure** with the `template` attribute * we opened a list of properties that that component accept with the `props` @@ -62,7 +63,7 @@ can just reference it by using as a tag. In our example, we can use the tag ``` In this case, we called the `` as it was an existing tag, as well -as we setted `iconSrc` or `featureTitle` as they were valid attributes. And the +as we set `iconSrc` or `featureTitle` as they were valid attributes. And the purpose of Vue.js components is this: increment your toolbox with your own tools. @@ -76,9 +77,11 @@ Vue.component('feature-card', { template: '

{{ title }}

' }) ``` + A component can have as many props as you’d like and by default, any value can be passed to any prop. In the template above, you’ll see that we can access this value on the component instance, just like with data. Once a prop is registered, you can pass data to it as a custom attribute, like this: + ```html @@ -87,11 +90,11 @@ Once a prop is registered, you can pass data to it as a custom attribute, like t ### Single File Components -Instead of declaring many components in a single file resulting in a long spagetti code. You may want to modularize your components by having different files. (ie. more info: https://vuejs.org/v2/guide/single-file-components.html) +Instead of declaring many components in a single file resulting in a long spaghetti code. You may want to modularize your components by having different files. (ie. more info: [Single File Components](https://vuejs.org/v2/guide/single-file-components.html)) -Enclose your template in a