From a4cedecbb83859dfe1f798614a3a41e05d13d911 Mon Sep 17 00:00:00 2001 From: Ali Satter Date: Fri, 13 Oct 2017 15:53:14 -0700 Subject: [PATCH 1/2] Updated code example to include closing tag. --- src/v2/guide/syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/guide/syntax.md b/src/v2/guide/syntax.md index 3b08d4639b..dc42051540 100644 --- a/src/v2/guide/syntax.md +++ b/src/v2/guide/syntax.md @@ -103,7 +103,7 @@ Here `href` is the argument, which tells the `v-bind` directive to bind the elem Another example is the `v-on` directive, which listens to DOM events: ``` html - + ``` Here the argument is the event name to listen to. We will talk about event handling in more detail too. From 9c375e36f80b301d11b0da809f4d55b123d5fc15 Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Sat, 14 Oct 2017 12:50:18 -0400 Subject: [PATCH 2/2] Update syntax examples with ellipses to imply content --- src/v2/guide/syntax.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/v2/guide/syntax.md b/src/v2/guide/syntax.md index dc42051540..6cab7c77c9 100644 --- a/src/v2/guide/syntax.md +++ b/src/v2/guide/syntax.md @@ -95,7 +95,7 @@ Here, the `v-if` directive would remove/insert the `

` element based on the tr Some directives can take an "argument", denoted by a colon after the directive name. For example, the `v-bind` directive is used to reactively update an HTML attribute: ``` html - + ... ``` Here `href` is the argument, which tells the `v-bind` directive to bind the element's `href` attribute to the value of the expression `url`. @@ -103,7 +103,7 @@ Here `href` is the argument, which tells the `v-bind` directive to bind the elem Another example is the `v-on` directive, which listens to DOM events: ``` html - + ... ``` Here the argument is the event name to listen to. We will talk about event handling in more detail too. @@ -113,7 +113,7 @@ Here the argument is the event name to listen to. We will talk about event handl Modifiers are special postfixes denoted by a dot, which indicate that a directive should be bound in some special way. For example, the `.prevent` modifier tells the `v-on` directive to call `event.preventDefault()` on the triggered event: ``` html -

+
...
``` You'll see other examples of modifiers later, [for `v-on`](events.html#Event-Modifiers) and [for `v-model`](forms.html#Modifiers), when we explore those features. @@ -126,20 +126,20 @@ The `v-` prefix serves as a visual cue for identifying Vue-specific attributes i ``` html - + ... - + ... ``` ### `v-on` Shorthand ``` html - + ... - + ... ``` They may look a bit different from normal HTML, but `:` and `@` are valid chars for attribute names and all Vue.js supported browsers can parse it correctly. In addition, they do not appear in the final rendered markup. The shorthand syntax is totally optional, but you will likely appreciate it when you learn more about its usage later.