Skip to content

Commit

Permalink
fix svg example post component change
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 16, 2014
1 parent 15592f0 commit 2cf4c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/svg/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
<script type="text/x-template" id="polygraph-template">
<polygon v-attr="points:points"></polygon>
<circle cx="100" cy="100" r="80"></circle>
<text v-repeat="stats" v-component="axis-label" v-attr="x:point.x, y:point.y">
{{label}}
</text>
<text v-repeat="stats" v-component="axis-label"></text>
</script>

<!-- template for the axis label component. -->
<script type="text/x-template" id="axis-label-template">
<text v-attr="x:point.x, y:point.y">{{label}}</text>
</script>

<!-- demo root element -->
Expand Down
2 changes: 2 additions & 0 deletions examples/svg/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Vue.component('polygraph', {
components: {
// a sub component for the labels
'axis-label': {
template: '#axis-label-template',
replace: true,
computed: {
point: function () {
return valueToPoint(
Expand Down

0 comments on commit 2cf4c67

Please sign in to comment.