You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Composing with Components - Change <ul> to <ol> (vuejs#577)
The example starts with <ul> and then the final code has <ol> (as it is a todo list makes more sense to be ordered). This is just a minor improvement to start with <ol> right away
Now you can compose it in another component's template:
271
271
272
272
```html
273
-
<ul>
273
+
<ol>
274
274
<!-- Create an instance of the todo-item component -->
275
275
<todo-item></todo-item>
276
-
</ul>
276
+
</ol>
277
277
```
278
278
279
279
But this would render the same text for every todo, which is not super interesting. We should be able to pass data from the parent scope into child components. Let's modify the component definition to make it accept a [prop](components.html#Props):
0 commit comments