@@ -602,9 +602,9 @@ As you can see, `v-model`'s two-way binding doesn't make sense here. Setting `st
Instead, you should use an array of __objects__ so that `v-model` can update the field on the object. For example:
-``` html
+{% codeblock lang:html %}
@@ -709,7 +709,7 @@ The `.literal` modifier has been removed, as the same can be easily achieved by
For example, you can update:
-``` js
+``` html
```
@@ -990,9 +990,9 @@ computed: {
You can even order by multiple columns:
-``` js
+{% codeblock lang:js %}
_.orderBy(this.users, ['name', 'last_login'], ['asc', 'desc'])
-```
+{% endcodeblock %}
{% raw %}
@@ -1070,9 +1070,9 @@ function pluralizeKnife (count) {
For a very naive implementation, you could do something like this:
-``` js
+{% codeblock lang:js %}
'$' + price.toFixed(2)
-```
+{% endcodeblock %}
In many cases though, you'll still run into strange behavior (e.g. `0.035.toFixed(2)` rounds up to `0.04`, but `0.045` rounds down to `0.04`). To work around these issues, you can use the [`accounting`](http://openexchangerates.github.io/accounting.js/) library to more reliably format currencies.
@@ -1365,9 +1365,9 @@ Instead, retrieve reactive data directly.
Use the native DOM API:
-``` js
+{% codeblock lang:js %}
myElement.appendChild(vm.$el)
-```
+{% endcodeblock %}
{% raw %}
@@ -1380,9 +1380,9 @@ myElement.appendChild(vm.$el)
Use the native DOM API:
-``` js
+{% codeblock lang:js %}
myElement.parentNode.insertBefore(vm.$el, myElement)
-```
+{% endcodeblock %}
{% raw %}
@@ -1395,15 +1395,15 @@ myElement.parentNode.insertBefore(vm.$el, myElement)
Use the native DOM API:
-``` js
+{% codeblock lang:js %}
myElement.parentNode.insertBefore(vm.$el, myElement.nextSibling)
-```
+{% endcodeblock %}
Or if `myElement` is the last child:
-``` js
+{% codeblock lang:js %}
myElement.parentNode.appendChild(vm.$el)
-```
+{% endcodeblock %}
{% raw %}
@@ -1416,9 +1416,9 @@ myElement.parentNode.appendChild(vm.$el)
Use the native DOM API:
-``` js
+{% codeblock lang:js %}
vm.$el.remove()
-```
+{% endcodeblock %}
{% raw %}