Skip to content

Commit

Permalink
Merge pull request #73 from canjs/tags
Browse files Browse the repository at this point in the history
Use valid tag names in component examples
  • Loading branch information
matthewp authored Dec 29, 2016
2 parents 40dfec3 + a43b5e9 commit 4ef58b4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ to add a new tab.

@demo demos/can-component/tabs.html

An instance of the tabs widget is created by creating `<tabs>` and `<panel>`
An instance of the tabs widget is created by creating `<my-tabs>` and `<my-panel>`
elements like:

<tabs>
<my-tabs>
{{#each foodTypes}}
<panel title='title'>{{content}}</panel>
<my-panel title='title'>{{content}}</my-panel>
{{/each}}
</tabs>
</my-tabs>

To add another panel, all we have to do is add data to `foodTypes` like:

Expand All @@ -296,7 +296,7 @@ To add another panel, all we have to do is add data to `foodTypes` like:
content: "Carrots, peas, kale"
})

The secret is that the `<panel>` element listens to when it is inserted
The secret is that the `<my-panel>` element listens to when it is inserted
and adds its data to the tabs' list of panels with:

var vm = this.parentViewModel = canViewModel(this.element.parentNode);
Expand Down Expand Up @@ -385,18 +385,18 @@ var AppViewModel = DefineMap.extend({
});
```

The `app` control passes paginate, paginate’s values, and websitesPromise to
The `my-app` component passes paginate, paginate’s values, and websitesPromise to
its sub-components:

<app>
<grid {promise-data}='websitesPromise'>
<my-app>
<my-grid {promise-data}='websitesPromise'>
{{#each items}}
<tr>
<td width='40%'>{{name}}</td>
<td width='70%'>{{url}}</td>
</tr>
{{/each}}
</grid>
</my-grid>
<next-prev {paginate}='paginate'></next-prev>
<page-count {page}='paginate.page' {count}='paginate.pageCount'/>
</app>
</my-app>

0 comments on commit 4ef58b4

Please sign in to comment.